Fix Array::RemoveAt to move element and avoid data copies

This commit is contained in:
Wojtek Figat
2025-06-17 23:27:26 +02:00
parent eb6010cba7
commit bcd2b1f0f2

View File

@@ -697,7 +697,7 @@ public:
--_count;
T* data = _allocation.Get();
if (_count)
data[index] = data[_count];
data[index] = MoveTemp(data[_count]);
Memory::DestructItems(data + _count, 1);
}