| 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 | { |
no outgoing calls
no test coverage detected