MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / resize

Function resize

include/Array.h:233–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 virtual int GetElementSize() const = 0;
232
233 inline void resize(int inSize)
234 {
235 if (inSize<length)
236 {
237 int s = GetElementSize();
238 memset(mBase + inSize*s, 0, (length-inSize)*s);
239 length = inSize;
240 }
241 else if (inSize>length)
242 {
243 EnsureSize(inSize);
244 length = inSize;
245 }
246 }
247 inline void __SetSize(int inLen) { resize(inLen); }
248
249 void __SetSizeExact(int inLen=0);

Callers 8

__SetSizeFunction · 0.70
____SetSizeFunction · 0.70
popFunction · 0.70
__resizeFunction · 0.70
BlitMethod · 0.50
InsertMethod · 0.50
SpliceMethod · 0.50
RemoveElementMethod · 0.50

Calls 2

EnsureSizeFunction · 0.85
GetElementSizeFunction · 0.70

Tested by

no test coverage detected