handle self-assign (#1331)
This commit is contained in:
@@ -546,6 +546,7 @@ namespace wi::allocator
|
||||
}
|
||||
Allocation& operator=(const Allocation& other)
|
||||
{
|
||||
if (&other == this) return *this;
|
||||
Reset();
|
||||
allocator = other.allocator;
|
||||
internal_state = other.internal_state;
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace wi
|
||||
|
||||
function& operator=(const function& other)
|
||||
{
|
||||
if (&other == this) return *this;
|
||||
destroy();
|
||||
if (other.ptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user