aboutsummaryrefslogtreecommitdiff
path: root/src/query_data.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/query_data.cpp
parent65a2125dba5652577588afee31d7333f13eb0c31 (diff)
Simplify compiler's `Map` and create a `StringMap` specifically for strings
Diffstat (limited to 'src/query_data.cpp')
-rw-r--r--src/query_data.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/query_data.cpp b/src/query_data.cpp
index b670ea958..763665e61 100644
--- a/src/query_data.cpp
+++ b/src/query_data.cpp
@@ -918,7 +918,7 @@ void generate_and_print_query_data_go_to_definitions(Checker *c) {
}
- AstFile **use_file_found = map_get(&c->info.files, hash_string(pos.file));
+ AstFile **use_file_found = string_map_get(&c->info.files, pos.file);
GB_ASSERT(use_file_found != nullptr);
AstFile *use_file = *use_file_found;
GB_ASSERT(use_file != nullptr);
@@ -1008,7 +1008,7 @@ void generate_and_print_query_data_go_to_definitions(Checker *c) {
AstFile *def_file = e->file;
if (def_file == nullptr) {
- auto *def_file_found = map_get(&c->info.files, hash_string(e->token.pos.file));
+ auto *def_file_found = string_map_get(&c->info.files, e->token.pos.file);
if (def_file_found == nullptr) {
continue;
}