aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-10-02 17:22:56 +0100
committergingerBill <bill@gingerbill.org>2021-10-02 17:22:56 +0100
commit00671a59a038c5fc9d4b2af02ca2194092b00778 (patch)
treec5e0689afb44fc3444a1666686d7fef4d7c03aba /src/check_type.cpp
parentebca0398a7ec76374322001e697a0aaa531eb22f (diff)
Minor code cleanup for backend; add `struct_fields_index_by_increasing_offset` for future use
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index b7bcfdc13..75fa503e5 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -39,8 +39,7 @@ void populate_using_entity_scope(CheckerContext *ctx, Ast *node, AstField *field
}
if (t->kind == Type_Struct) {
- for_array(i, t->Struct.fields) {
- Entity *f = t->Struct.fields[i];
+ for (Entity *f : t->Struct.fields) {
GB_ASSERT(f->kind == Entity_Variable);
String name = f->token.string;
Entity *e = scope_lookup_current(ctx->scope, name);