Use asserts in array

This commit is contained in:
abdelrahman committed 2025-05-05 20:06:58 +01:00
1 parent cac66b9dbb
commit 6c8434a530
13 files changed
+264 -734

No files matched your search

+1 -3
View File
@@ -1,6 +1,4 @@
if (!array || index >= array->count) {{
return NULL;
}}
assert(array != NULL & index < array->count);
u8 *ptr = (u8 *)(array->items) + (array->item_size * index);
return ({T} *)ptr;