Use asserts in array
This commit is contained in:
1 parent
cac66b9dbb
commit
6c8434a530
13 files changed
+264
-734
No files matched your search
@@ -1,11 +1,7 @@
|
||||
assert(allocator != NULL);
|
||||
|
||||
u64 allocation_size = sizeof({ArrayType}) + item_size * capacity;
|
||||
{ArrayType} *array = NULL;
|
||||
|
||||
if (!allocator) {{
|
||||
goto RETURN_GENERIC_ARRAY_ALLOC;
|
||||
}}
|
||||
|
||||
array = wapp_mem_allocator_alloc(allocator, allocation_size);
|
||||
{ArrayType} *array = wapp_mem_allocator_alloc(allocator, allocation_size);
|
||||
if (!array) {{
|
||||
goto RETURN_GENERIC_ARRAY_ALLOC;
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user