| 97 | } |
| 98 | |
| 99 | NULLCRef VectorIndex(vector* vec, unsigned int index) |
| 100 | { |
| 101 | NULLCRef ret = { 0, 0 }; |
| 102 | if(index >= vec->size) |
| 103 | { |
| 104 | nullcThrowError("operator[] array index out of bounds"); |
| 105 | return ret; |
| 106 | } |
| 107 | ret.typeID = (vec->flags ? nullcGetSubType(vec->elemType) : vec->elemType); |
| 108 | ret.ptr = vec->flags ? ((char**)vec->data.ptr)[index] : (vec->data.ptr + vec->elemSize * index); |
| 109 | return ret; |
| 110 | } |
| 111 | |
| 112 | void VectorReserve(unsigned int size, vector* vec) |
| 113 | { |
nothing calls this directly
no test coverage detected