summaryrefslogtreecommitdiffhomepage
path: root/include/stc/csmap.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-24 17:15:24 +0100
committerTyge Løvset <[email protected]>2023-02-24 17:15:24 +0100
commit1a2143fbbda0805fdc9d3862e9c45cb0fc6a336f (patch)
tree7c6a139207c7efaec414ad85dd4ea58a6f3b19b5 /include/stc/csmap.h
parentdde5e3465c4198841fdba32dfaf2220c87bc6a94 (diff)
downloadSTC-modified-1a2143fbbda0805fdc9d3862e9c45cb0fc6a336f.tar.gz
STC-modified-1a2143fbbda0805fdc9d3862e9c45cb0fc6a336f.zip
Added eq function to cspan.
Final cleanup normalized var naming.
Diffstat (limited to 'include/stc/csmap.h')
-rw-r--r--include/stc/csmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/csmap.h b/include/stc/csmap.h
index e908f157..0f72ca2d 100644
--- a/include/stc/csmap.h
+++ b/include/stc/csmap.h
@@ -224,9 +224,9 @@ _cx_memb(_advance)(_cx_iter it, size_t n) {
STC_INLINE bool
_cx_memb(_eq)(const _cx_self* m1, const _cx_self* m2) {
if (_cx_memb(_size)(m1) != _cx_memb(_size)(m2)) return false;
- _cx_iter i1 = _cx_memb(_begin)(m1), i2 = _cx_memb(_begin)(m2);
- for (; i1.ref && i2.ref; _cx_memb(_next)(&i1), _cx_memb(_next)(&i2)) {
- const _cx_rawkey _rx = i_keyto(_i_keyref(i1.ref)), _ry = i_keyto(_i_keyref(i2.ref));
+ _cx_iter i = _cx_memb(_begin)(m1), j = _cx_memb(_begin)(m2);
+ for (; i.ref; _cx_memb(_next)(&i), _cx_memb(_next)(&j)) {
+ const _cx_rawkey _rx = i_keyto(_i_keyref(i.ref)), _ry = i_keyto(_i_keyref(j.ref));
if ((i_cmp_functor(m1, (&_rx), (&_ry))) != 0) return false;
}
return true;