aboutsummaryrefslogtreecommitdiff
path: root/src/ptr_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ptr_map.cpp')
-rw-r--r--src/ptr_map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ptr_map.cpp b/src/ptr_map.cpp
index 99d96d76a..19ba37085 100644
--- a/src/ptr_map.cpp
+++ b/src/ptr_map.cpp
@@ -13,7 +13,7 @@ enum : MapIndex { MAP_SENTINEL = ~(MapIndex)0 };
template <typename T>
struct PtrMapConstant {
- static constexpr T const TOMBSTONE = (T)reinterpret_cast<void *>(~(uintptr)0);
+ static constexpr void const *TOMBSTONE = reinterpret_cast<void *>(~(uintptr)0);
};
template <>
@@ -271,7 +271,7 @@ template <typename K, typename V>
gb_internal void map_remove(PtrMap<K, V> *h, K key) {
MapIndex found_index = 0;
if (map_try_get(h, key, &found_index)) {
- h->entries[found_index].key = PtrMapConstant<K>::TOMBSTONE;
+ h->entries[found_index].key = cast(K)PtrMapConstant<K>::TOMBSTONE;
h->count -= 1;
}
}