aboutsummaryrefslogtreecommitdiff
path: root/src/string_set.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-04-27 09:03:05 +0100
committerGitHub <noreply@github.com>2024-04-27 09:03:05 +0100
commit5969796fbfaa62ea6aba8f0e3915ab8282bb71b5 (patch)
tree55775ab838d39df7b127c3e003b16ca4a59a0d0a /src/string_set.cpp
parent9d3f835e31c08f40dfd420806942af2b7042f993 (diff)
parent652079476489b2539c77824ec2719847f28c352d (diff)
Merge pull request #3490 from odin-lang/new-string-map
Change layout of compiler hash map types
Diffstat (limited to 'src/string_set.cpp')
-rw-r--r--src/string_set.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/string_set.cpp b/src/string_set.cpp
index fb4640c20..a37d8ba80 100644
--- a/src/string_set.cpp
+++ b/src/string_set.cpp
@@ -208,7 +208,9 @@ gb_internal void string_set__erase(StringSet *s, MapFindResult fr) {
}
auto *entry = &s->entries[fr.entry_index];
*entry = s->entries[s->entries.count-1];
- StringHashKey key = {entry->hash, entry->value};
+ StringHashKey key;
+ key.hash = entry->hash;
+ key.string = entry->value;
last = string_set__find(s, key);
if (last.entry_prev != MAP_SENTINEL) {
s->entries[last.entry_prev].next = fr.entry_index;