From bcd2b1f0f203ea8996b87d55b149641a784aea2b Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 17 Jun 2025 23:27:26 +0200 Subject: [PATCH] Fix `Array::RemoveAt` to move element and avoid data copies --- Source/Engine/Core/Collections/Array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Core/Collections/Array.h b/Source/Engine/Core/Collections/Array.h index 5845d7f50..01b5d044c 100644 --- a/Source/Engine/Core/Collections/Array.h +++ b/Source/Engine/Core/Collections/Array.h @@ -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); }