mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
AK: Make HashTable::operator=(HashTable&&) clear the moved-from table
This is consistent with how other AK containers behave when moved from.
This commit is contained in:
parent
259822493f
commit
c584421592
2 changed files with 27 additions and 1 deletions
|
@ -110,7 +110,8 @@ public:
|
|||
|
||||
HashTable& operator=(HashTable&& other) noexcept
|
||||
{
|
||||
swap(*this, other);
|
||||
HashTable temporary { move(other) };
|
||||
swap(*this, temporary);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue