Refactor array to avoid having to include external types

This commit is contained in:
2025-05-05 16:33:08 +01:00
parent 98a802e3eb
commit 4e3945d1d0
18 changed files with 841 additions and 1035 deletions

View File

@@ -7,7 +7,7 @@
u64 remaining_capacity = array->capacity - array->count;
if (other->count >= remaining_capacity) {{
u64 new_capacity = wapp_misc_utils_u64_round_up_pow2(array->capacity * 2);
output = wapp_{Tlower}_array_alloc_capacity(allocator, new_capacity);
output = ({ArrayType} *)_array_alloc_capacity(allocator, new_capacity, array->item_size);
if (!output) {{
output = array;
goto RETURN_{Tupper}_ARRAY_EXTEND_ALLOC;