Fix Array::RemoveAt to move element and avoid data copies
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user