MCPcopy Create free account
hub / github.com/beefytech/Beef / RemoveRange

Method RemoveRange

BeefySysLib/util/Array.h:607–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605 }
606
607 void RemoveRange(intptr idx, intptr length)
608 {
609 BF_ASSERT(
610 ((uintptr)idx < (uintptr)this->mSize) &&
611 ((uintptr)length > 0) &&
612 ((uintptr)(idx + length) <= (uintptr)this->mSize));
613
614 for (intptr i = idx; i < idx + length; i++)
615 this->mVals[i].~T();
616
617 // If we're removing the last element then we don't have to move anything
618 if (idx != this->mSize - length)
619 {
620 intptr moveCount = this->mSize - idx - length;
621 MoveArray(this->mVals + idx, this->mVals + idx + length, moveCount);
622 }
623 this->mSize -= (int_cosize)length;
624 }
625
626 void Insert(intptr idx, const T& val)
627 {

Callers 1

ModelDefAnimation_ClipFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected