MCPcopy Create free account
hub / github.com/WheretIB/nullc / AutoArrayIndex

Method AutoArrayIndex

NULLC/StdLib.cpp:866–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864}
865
866NULLCRef NULLC::AutoArrayIndex(NULLCAutoArray* left, unsigned int index)
867{
868 NULLCRef ret = { 0, 0 };
869 if(index >= left->len)
870 {
871 nullcThrowError("ERROR: array index out of bounds");
872 return ret;
873 }
874 ret.typeID = left->typeID;
875 ret.ptr = (char*)left->ptr + index * nullcGetTypeSize(ret.typeID);
876 return ret;
877}
878
879void NULLC::AutoArray(NULLCAutoArray* arr, int type, unsigned count)
880{

Callers

nothing calls this directly

Calls 2

nullcThrowErrorFunction · 0.70
nullcGetTypeSizeFunction · 0.50

Tested by

no test coverage detected