Add static, runtime and debug assert utilities
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
assert(array != NULL && index < array->count);
|
||||
wapp_debug_assert(array != NULL, "`array` should not be NULL");
|
||||
wapp_runtime_assert(index < array->count, "`index` is out of bounds");
|
||||
|
||||
u8 *ptr = (u8 *)(array->items) + (array->item_size * index);
|
||||
return ({T} *)ptr;
|
||||
|
Reference in New Issue
Block a user