aboutsummaryrefslogtreecommitdiff
path: root/src/ptr_map.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-04 13:30:27 +0000
committergingerBill <bill@gingerbill.org>2023-01-04 13:30:27 +0000
commitd06a0e7093c3f06a474a040385f1b9dfdfce29ad (patch)
tree4f17b0ce16394de0202f888db37d8b13660ce5f8 /src/ptr_map.cpp
parentb3a55b8b6f54b71bb527c2b2b1cbe8b01e28d8a2 (diff)
Improve the `PtrSet` to be as simple and small as possible
Diffstat (limited to 'src/ptr_map.cpp')
-rw-r--r--src/ptr_map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ptr_map.cpp b/src/ptr_map.cpp
index ae3cd4b40..8869bf3fe 100644
--- a/src/ptr_map.cpp
+++ b/src/ptr_map.cpp
@@ -41,7 +41,7 @@ gb_internal gb_inline u32 ptr_map_hash_key(uintptr key) {
u32 word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u;
res = (word >> 22u) ^ word;
#endif
- return res ^ (res == MAP_SENTINEL);
+ return res;
}
gb_internal gb_inline u32 ptr_map_hash_key(void const *key) {
return ptr_map_hash_key((uintptr)key);