Browse Source

Same fix for removeInternal

tags/v2.4.1
falkTX 3 years ago
parent
commit
25bfde3a16
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      source/modules/water/containers/Array.h

+ 2
- 1
source/modules/water/containers/Array.h View File

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


Loading…
Cancel
Save