mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Allocate temp array instead of sorting in place
This commit is contained in:
@@ -6941,8 +6941,8 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort enum fields in place in ascending order
|
auto enum_constants = array_make<Entity *>(temporary_allocator(), type->Enum.fields.count);
|
||||||
Array<Entity *> enum_constants = type->Enum.fields;
|
array_copy(&enum_constants, type->Enum.fields, 0);
|
||||||
array_sort(enum_constants, enum_constant_entity_cmp);
|
array_sort(enum_constants, enum_constant_entity_cmp);
|
||||||
|
|
||||||
BigInt minus_one = big_int_make_i64(-1);
|
BigInt minus_one = big_int_make_i64(-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user