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

Method RemoveAtFast

BeefySysLib/util/Array.h:593–605  ·  view source on GitHub ↗

'Fast' because it's allowed to change item order

Source from the content-addressed store, hash-verified

591
592 // 'Fast' because it's allowed to change item order
593 void RemoveAtFast(intptr idx)
594 {
595 BF_ASSERT((uintptr)idx < (uintptr)this->mSize);
596
597 this->mVals[idx].~T();
598
599 // If we're removing the last element then we don't have to move anything
600 if (idx != this->mSize - 1)
601 {
602 new (&this->mVals[idx]) T(std::move(this->mVals[this->mSize - 1]));
603 }
604 this->mSize--;
605 }
606
607 void RemoveRange(intptr idx, intptr length)
608 {

Callers 8

WorkerProcMethod · 0.45
AllocMethod · 0.45
RemoveLinesMethod · 0.45
RehupLineDataMethod · 0.45
ProcessPurgatoryMethod · 0.45
RemoveOldDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected