mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +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
Notes:
sideshowbarker
2024-07-18 17:10:35 +09:00
Author: https://github.com/awesomekling
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