aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-04-26 14:15:22 +0100
committergingerBill <bill@gingerbill.org>2024-04-26 14:15:22 +0100
commitc685b404ea9cc9807b6d8cfc6f2a119924a79b4f (patch)
tree56d248220bbe2e3c496abd45d198d732815dc775 /src/checker.cpp
parenta3e77dcc3bc4cf7d0548afa73d38914354761aa0 (diff)
Implement dumb `StringMap`
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index f3e14eeba..3b51cc6e0 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -4310,8 +4310,9 @@ gb_internal bool correct_single_type_alias(CheckerContext *c, Entity *e) {
gb_internal bool correct_type_alias_in_scope_backwards(CheckerContext *c, Scope *s) {
bool correction = false;
for (u32 n = s->elements.count, i = n-1; i < n; i--) {
- Entity *e = s->elements.entries[i].value;
- if (e != nullptr) {
+ auto const &entry = s->elements.entries[i];
+ Entity *e = entry.value;
+ if (entry.hash && e != nullptr) {
correction |= correct_single_type_alias(c, e);
}
}
@@ -4490,8 +4491,6 @@ gb_internal void check_all_global_entities(Checker *c) {
(void)type_align_of(e->type);
}
}
-
- gb_printf_err("Global Entity Count: %td\n", c->info.entities.count);
}