mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 12:30:28 +00:00
Use scope_reserve call directly
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user