Use scope_reserve call directly

This commit is contained in:
gingerBill
2026-03-11 14:22:36 +00:00
parent 461486ef6c
commit b7bb7a1dc4
2 changed files with 2 additions and 3 deletions

View File

@@ -388,7 +388,7 @@ u64 get_feature_flag_from_name(String const &name) {
}
if (name == "using-stmt") {
return OptInFeatureFlag_UsingStmt;
}
}
if (name == "force-type-assert") {
return OptInFeatureFlag_ForceTypeAssert;
}

View File

@@ -238,8 +238,7 @@ gb_internal Scope *create_scope_from_file(CheckerInfo *info, AstFile *f) {
isize init_elements_capacity = gb_max(DEFAULT_SCOPE_CAPACITY, 2*f->total_file_decl_count);
Scope *s = create_scope(info, f->pkg->scope);
string_map_init(&s->elements, init_elements_capacity);
scope_reserve(s, init_elements_capacity);
s->flags |= ScopeFlag_File;
s->file = f;