MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Reserve

Method Reserve

SampleFramework12/v1.00/Containers.h:391–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 }
390
391 void Reserve(uint64 newMaxSize)
392 {
393 if(newMaxSize <= array.Size())
394 return;
395
396 uint64 arraySize = array.Size();
397 if(arraySize == 0)
398 arraySize = 16;
399
400 while(newMaxSize > arraySize)
401 arraySize *= 2;
402
403 array.Resize(arraySize);
404 }
405
406 uint64 Add(T item)
407 {

Callers

nothing calls this directly

Calls 2

ResizeMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected