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 struct PtrMapConstant { - static constexpr T const TOMBSTONE = (T)reinterpret_cast(~(uintptr)0); + static constexpr void const *TOMBSTONE = reinterpret_cast(~(uintptr)0); }; template <> @@ -271,7 +271,7 @@ template gb_internal void map_remove(PtrMap *h, K key) { MapIndex found_index = 0; if (map_try_get(h, key, &found_index)) { - h->entries[found_index].key = PtrMapConstant::TOMBSTONE; + h->entries[found_index].key = cast(K)PtrMapConstant::TOMBSTONE; h->count -= 1; } }