From 348c91ba479e276c12d00b3c8cd9dd4dd6346d92 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 11 May 2022 15:13:12 +0200 Subject: minor cleanup cmap --- include/stc/cmap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/stc/cmap.h') diff --git a/include/stc/cmap.h b/include/stc/cmap.h index 627664d2..0f5806c1 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -316,11 +316,11 @@ STC_DEF void _cx_memb(_clear)(_cx_self* self) { STC_DEF chash_bucket_t _cx_memb(_bucket_)(const _cx_self* self, const _cx_rawkey* rkeyptr) { const uint64_t _hash = i_hash(rkeyptr); - uint8_t _hx; i_size _cap = self->bucket_count; + i_size _cap = self->bucket_count; chash_bucket_t b = {c_paste(fastrange_,i_size)(_hash, _cap), (uint8_t)(_hash | 0x80)}; - const uint8_t* _hashx = self->_hashx; - while ((_hx = _hashx[b.idx])) { - if (_hx == b.hx) { + const uint8_t* _hx = self->_hashx; + while (_hx[b.idx]) { + if (_hx[b.idx] == b.hx) { _cx_rawkey _raw = i_keyto(_i_keyref(self->table + b.idx)); if (i_eq((&_raw), rkeyptr)) break; -- cgit v1.2.3