diff --git a/Source/Engine/Core/Collections/Array.h b/Source/Engine/Core/Collections/Array.h index cf45ed060..a8390f051 100644 --- a/Source/Engine/Core/Collections/Array.h +++ b/Source/Engine/Core/Collections/Array.h @@ -734,9 +734,7 @@ public: } else { - Array tmp = MoveTemp(other); - other = *this; - *this = MoveTemp(tmp); + ::Swap(other, *this); } } diff --git a/Source/Engine/Core/Collections/Dictionary.h b/Source/Engine/Core/Collections/Dictionary.h index dd73be390..d2a840fff 100644 --- a/Source/Engine/Core/Collections/Dictionary.h +++ b/Source/Engine/Core/Collections/Dictionary.h @@ -616,9 +616,7 @@ public: } else { - Dictionary tmp = MoveTemp(other); - other = *this; - *this = MoveTemp(tmp); + ::Swap(other, *this); } }