diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-05 17:03:02 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-05 17:03:02 +0000 |
| commit | 6646348e1a0086d9a2341d0866f787ffc2608c8f (patch) | |
| tree | e213ed15493bd353c27387d5514e309dc29a3491 /src/ptr_map.cpp | |
| parent | c38d6dc9592cff3bfd21c45076cd82df2d763eb2 (diff) | |
Increase usage of `PtrMap`
Diffstat (limited to 'src/ptr_map.cpp')
| -rw-r--r-- | src/ptr_map.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ptr_map.cpp b/src/ptr_map.cpp index 4659fcf9b..2387a2a20 100644 --- a/src/ptr_map.cpp +++ b/src/ptr_map.cpp @@ -18,8 +18,12 @@ struct PtrMap { }; -template <typename K> -u32 ptr_map_hash_key(K key) { +u32 ptr_map_hash_key(void const *key) { + // TODO(bill): Improve ptr_map_hash_key + return gb_fnv32a(&key, gb_size_of(key)); +} +u32 ptr_map_hash_key(uintptr key) { + // TODO(bill): Improve ptr_map_hash_key return gb_fnv32a(&key, gb_size_of(key)); } |