summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cmap.h
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-05-13 01:21:39 +0200
committerTyge Lovset <[email protected]>2022-05-13 01:21:39 +0200
commit0232d9f3f6206305662cb9163fdb23372ab6b227 (patch)
tree29ad27762c09f3af3edd0b716e8eabcbb68965cb /include/stc/cmap.h
parent7b6fb49407abdd41c2bc1fdb8c84aaabcc3295de (diff)
downloadSTC-modified-0232d9f3f6206305662cb9163fdb23372ab6b227.tar.gz
STC-modified-0232d9f3f6206305662cb9163fdb23372ab6b227.zip
constness and code formatting.
Diffstat (limited to 'include/stc/cmap.h')
-rw-r--r--include/stc/cmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h
index 0f5806c1..e66f60c0 100644
--- a/include/stc/cmap.h
+++ b/include/stc/cmap.h
@@ -321,7 +321,7 @@ _cx_memb(_bucket_)(const _cx_self* self, const _cx_rawkey* rkeyptr) {
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));
+ const _cx_rawkey _raw = i_keyto(_i_keyref(self->table + b.idx));
if (i_eq((&_raw), rkeyptr))
break;
}
@@ -403,7 +403,7 @@ _cx_memb(_erase_entry)(_cx_self* self, _cx_value* _val) {
j = 0;
if (! _hashx[j])
break;
- _cx_rawkey _raw = i_keyto(_i_keyref(_slot + j));
+ const _cx_rawkey _raw = i_keyto(_i_keyref(_slot + j));
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;