Merge branch 'mtszkarbowiak-fix/swapping'
This commit is contained in:
@@ -734,9 +734,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Array tmp = MoveTemp(other);
|
||||
other = *this;
|
||||
*this = MoveTemp(tmp);
|
||||
::Swap(other, *this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -616,9 +616,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Dictionary tmp = MoveTemp(other);
|
||||
other = *this;
|
||||
*this = MoveTemp(tmp);
|
||||
::Swap(other, *this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ template<typename T>
|
||||
inline void Swap(T& a, T& b) noexcept
|
||||
{
|
||||
T tmp = MoveTemp(a);
|
||||
a = b;
|
||||
a = MoveTemp(b);
|
||||
b = MoveTemp(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user