From 00671a59a038c5fc9d4b2af02ca2194092b00778 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 2 Oct 2021 17:22:56 +0100 Subject: Minor code cleanup for backend; add `struct_fields_index_by_increasing_offset` for future use --- src/check_type.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/check_type.cpp') 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); -- cgit v1.2.3