summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cbox.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-04-23 14:00:47 +0200
committerTyge Løvset <[email protected]>2022-04-23 14:00:47 +0200
commit2b74b8a880d48232892ca84ac29efacd66905cd4 (patch)
tree306c25535d7983afb640739d6ad0b0e8c00a8e18 /include/stc/cbox.h
parentdd5551dec268da39ad1c5c66de014e4621d24748 (diff)
downloadSTC-modified-2b74b8a880d48232892ca84ac29efacd66905cd4.tar.gz
STC-modified-2b74b8a880d48232892ca84ac29efacd66905cd4.zip
Integrated (and removed) c_hash32 and c_hash64 into c_default_hash, which is improved. Added i_key_ssv and i_val_ssv (cstr with csview as raw-type).
Diffstat (limited to 'include/stc/cbox.h')
-rw-r--r--include/stc/cbox.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/stc/cbox.h b/include/stc/cbox.h
index 27536c21..fa6ef2a9 100644
--- a/include/stc/cbox.h
+++ b/include/stc/cbox.h
@@ -147,10 +147,8 @@ _cx_memb(_take)(_cx_self* self, _cx_self other) {
STC_INLINE uint64_t
_cx_memb(_value_hash)(const _cx_value* x, size_t n) {
- #if c_option(c_no_cmp) && UINTPTR_MAX == UINT64_MAX
- return c_hash64(&x, 8);
- #elif c_option(c_no_cmp)
- return c_hash32(&x, 4);
+ #if c_option(c_no_cmp)
+ return c_default_hash(&x, sizeof x);
#else
_cx_raw rx = i_keyto(x);
return i_hash((&rx), (sizeof rx));