aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-04-13 13:02:30 +0100
committergingerBill <bill@gingerbill.org>2020-04-13 13:02:30 +0100
commitf09b6a4c90805a562b2252430f844e85d06f1ee1 (patch)
tree39555c6b9503685c71fd969034ddd5614bfdc357 /src/check_stmt.cpp
parent65a2125dba5652577588afee31d7333f13eb0c31 (diff)
Simplify compiler's `Map` and create a `StringMap` specifically for strings
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index be2f6b06a..0c90e08f0 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1959,8 +1959,8 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
init_entity_foreign_library(ctx, e);
auto *fp = &ctx->checker->info.foreigns;
- HashKey key = hash_string(name);
- Entity **found = map_get(fp, key);
+ StringHashKey key = string_hash_string(name);
+ Entity **found = string_map_get(fp, key);
if (found) {
Entity *f = *found;
TokenPos pos = f->token.pos;
@@ -1973,7 +1973,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
LIT(name), LIT(pos.file), pos.line, pos.column);
}
} else {
- map_set(fp, key, e);
+ string_map_set(fp, key, e);
}
} else if (e->flags & EntityFlag_Static) {
if (vd->values.count > 0) {