aboutsummaryrefslogtreecommitdiff
path: root/src/ptr_set.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-03 18:21:42 +0000
committergingerBill <bill@gingerbill.org>2023-01-03 18:21:42 +0000
commit17fa8cb6ef4424e4c7cff2439e2d52220f440660 (patch)
treeb41c9d90d263173341555e9097dff8ba13919f39 /src/ptr_set.cpp
parent855ebceadcc4612a6451f268ab6d6693838ed5f4 (diff)
Add extra mutex to TypePth just in case
Diffstat (limited to 'src/ptr_set.cpp')
-rw-r--r--src/ptr_set.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ptr_set.cpp b/src/ptr_set.cpp
index 303bde07e..9b8b678f8 100644
--- a/src/ptr_set.cpp
+++ b/src/ptr_set.cpp
@@ -1,5 +1,7 @@
template <typename T>
struct PtrSetEntry {
+ static_assert(sizeof(T) == sizeof(void *), "Key size must be pointer size");
+
T ptr;
MapIndex next;
@@ -10,6 +12,7 @@ struct PtrSetEntry {
template <typename T>
struct PtrSet {
+
Slice<MapIndex> hashes;
Array<PtrSetEntry<T>> entries;
};