1
Fork 0
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:
Andreas Kling 2021-05-30 14:23:23 +02:00
parent 259822493f
commit c584421592
2 changed files with 27 additions and 1 deletions

View file

@ -110,7 +110,8 @@ public:
HashTable& operator=(HashTable&& other) noexcept
{
swap(*this, other);
HashTable temporary { move(other) };
swap(*this, temporary);
return *this;
}