diff options
Diffstat (limited to 'include/stc/cmap.h')
| -rw-r--r-- | include/stc/cmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h index 978d624a..25356e16 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -294,7 +294,7 @@ 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, (sizeof *rkeyptr));
+ const uint64_t _hash = i_hash(rkeyptr);
uint8_t _hx; _cx_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;
@@ -380,7 +380,7 @@ _cx_memb(_erase_entry)(_cx_self* self, _cx_value* _val) { if (! _hashx[j])
break;
_cx_rawkey _raw = i_keyto(_i_keyref(_slot + j));
- k = c_paste(fastrange_,i_size)(i_hash((&_raw), (sizeof _raw)), _cap);
+ k = c_paste(fastrange_,i_size)(i_hash((&_raw)), _cap);
if ((j < i) ^ (k <= i) ^ (k > j)) /* is k outside (i, j]? */
_slot[i] = _slot[j], _hashx[i] = _hashx[j], i = j;
}
|
