diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-27 11:25:22 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-27 11:25:22 +0000 |
| commit | 288434ab30bb8038d9767151adc478cd82f2ef6b (patch) | |
| tree | a7ff104cff1bb58d81fe6b969cffa8e8474a1a54 /src | |
| parent | 62d231d6854361f22e2d2ad0fbfe2776ad717c4e (diff) | |
One more time with a different cast?
Diffstat (limited to 'src')
| -rw-r--r-- | src/ptr_map.cpp | 4 |
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; } } |