diff options
| author | Tyge Lovset <[email protected]> | 2023-03-29 08:45:28 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-03-29 08:45:28 +0200 |
| commit | 97d205f7ba096a9872afbce5e696a8806d7b72d1 (patch) | |
| tree | 27d1b31ed756a8a74157e48a27bcb506d66e097a /include/stc/cvec.h | |
| parent | 4f0ca428e332761666916477b22c3301044a85c6 (diff) | |
| download | STC-modified-97d205f7ba096a9872afbce5e696a8806d7b72d1.tar.gz STC-modified-97d205f7ba096a9872afbce5e696a8806d7b72d1.zip | |
Removed i_less_functor, i_cmp_functor, i_eq_functor and i_hash_functor: not needed.
Simplified cvec_X_eq() and cdeq_X_eq()
Diffstat (limited to 'include/stc/cvec.h')
| -rw-r--r-- | include/stc/cvec.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/stc/cvec.h b/include/stc/cvec.h index 91cdb25c..8f35e5fc 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -236,9 +236,8 @@ _cx_memb(_get_mut)(const _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; |
