MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / insert

Method insert

Engine/source/core/util/tVector.h:399–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399template<class T> inline void Vector<T>::insert(U32 index)
400{
401 AssertFatal(index <= mElementCount, "Vector<T>::insert - out of bounds index.");
402
403 if(mElementCount == mArraySize)
404 resize(mElementCount + 1);
405 else
406 mElementCount++;
407
408 dMemmove(&mArray[index + 1],
409 &mArray[index],
410 (mElementCount - index - 1) * sizeof(value_type));
411
412 constructInPlace(&mArray[index]);
413}
414
415template<class T> inline void Vector<T>::insert(U32 index,const T& x)
416{

Callers

nothing calls this directly

Calls 4

constructInPlaceFunction · 0.85
insertFunction · 0.85
resizeFunction · 0.50
dMemmoveFunction · 0.50

Tested by

no test coverage detected