summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cdeq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/cdeq.h')
-rw-r--r--include/stc/cdeq.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h
index c4f84a1b..09c0a7f8 100644
--- a/include/stc/cdeq.h
+++ b/include/stc/cdeq.h
@@ -198,9 +198,8 @@ _cx_memb(_get_mut)(_cx_self* self, _cx_raw raw)
STC_INLINE bool
_cx_memb(_eq)(const _cx_self* x, const _cx_self* y) {
if (x->_len != y->_len) return false;
- _cx_iter i = _cx_memb(_begin)(x), j = _cx_memb(_begin)(y);
- for (; i.ref; _cx_memb(_next)(&i), _cx_memb(_next)(&j)) {
- const _cx_raw _rx = i_keyto(i.ref), _ry = i_keyto(j.ref);
+ for (intptr_t i = 0; i < x->_len; ++i) {
+ const _cx_raw _rx = i_keyto(x->data+i), _ry = i_keyto(y->data+i);
if (!(i_eq((&_rx), (&_ry)))) return false;
}
return true;