diff options
| author | Tyge Løvset <[email protected]> | 2022-05-11 15:13:12 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-05-11 15:13:12 +0200 |
| commit | 348c91ba479e276c12d00b3c8cd9dd4dd6346d92 (patch) | |
| tree | f2367adbb13b15c4c49a2b50de11284fc9a0ea7b /include/stc/cmap.h | |
| parent | 649060e1275f04985ded4b324ae8e2b004788e78 (diff) | |
| download | STC-modified-348c91ba479e276c12d00b3c8cd9dd4dd6346d92.tar.gz STC-modified-348c91ba479e276c12d00b3c8cd9dd4dd6346d92.zip | |
minor cleanup cmap
Diffstat (limited to 'include/stc/cmap.h')
| -rw-r--r-- | include/stc/cmap.h | 8 |
1 files changed, 4 insertions, 4 deletions
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;
|
