Array#
-
struct nvArray#
Type-generic dynamically growing array implementation.
Methods#
Warning
doxygenfunction: Unable to resolve function “nvArray_free_each” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name, got keyword: void [error at 4] void nvArray_free_each (nvArray *array, void(free_func)(void *)) —-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 23] void nvArray_free_each (nvArray *array, void(free_func)(void *)) ———————–^ If declarator-id: Invalid C++ declaration: Expecting “,” or “)” in parameters-and-qualifiers, got “(”. [error at 55] void nvArray_free_each (nvArray *array, void(free_func)(void *)) ——————————————————-^
-
void nvArray_add(nvArray *array, void *elem)#
Add new element to array.
- Parameters:
array – Array to append to
elem – Void pointer to element
-
void *nvArray_pop(nvArray *array, size_t index)#
Remove element by index from array and return the element. Returns
NULL
if failed.Note
The array is not sorted after removal, meaning the array gets slightly randomized every remove call.
- Parameters:
array – Array
index – Index of element to remove
- Returns:
void *