|
@@ -1097,12 +1097,13 @@ private: |
|
|
{
|
|
|
{
|
|
|
--numUsed;
|
|
|
--numUsed;
|
|
|
ElementType* const e = data.elements + indexToRemove;
|
|
|
ElementType* const e = data.elements + indexToRemove;
|
|
|
e->~ElementType();
|
|
|
|
|
|
const int numberToShift = numUsed - indexToRemove;
|
|
|
const int numberToShift = numUsed - indexToRemove;
|
|
|
|
|
|
|
|
|
if (numberToShift > 0)
|
|
|
if (numberToShift > 0)
|
|
|
data.moveMemory (e, e + 1, static_cast<size_t>(numberToShift));
|
|
|
data.moveMemory (e, e + 1, static_cast<size_t>(numberToShift));
|
|
|
|
|
|
|
|
|
|
|
|
e[numUsed].~ElementType();
|
|
|
|
|
|
|
|
|
minimiseStorageAfterRemoval();
|
|
|
minimiseStorageAfterRemoval();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|