clay/generator/array_get_value.template.c
Nic Barker cf12cd6af8
Some checks failed
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Failing after 1m44s
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Failing after 13s
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
[Core] Standardise number types to int32_t for array indices, lengths and capacities (#152)
2025-01-03 11:24:32 +13:00

3 lines
156 B
C

$TYPE$ $NAME$_Get($NAME$ *array, int32_t index) {
return Clay__Array_RangeCheck(index, array->length) ? array->internalArray[index] : $DEFAULT_VALUE$;
}