mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-hashmap-uninitialized-move-constructor' into 'master'
Fix uninitialized values of hashmap propagating in move See merge request kart-krew-dev/ring-racers-internal!2542
This commit is contained in:
commit
f9e7800d4f
1 changed files with 10 additions and 1 deletions
|
|
@ -240,7 +240,16 @@ public:
|
|||
|
||||
HashMap(HashMap&& r) noexcept
|
||||
{
|
||||
*this = std::move(r);
|
||||
buckets_ = r.buckets_;
|
||||
r.buckets_ = 0;
|
||||
size_ = r.size_;
|
||||
r.size_ = 0;
|
||||
heads_ = r.heads_;
|
||||
r.heads_ = nullptr;
|
||||
hasher_ = r.hasher_;
|
||||
r.hasher_ = {};
|
||||
key_equal_ = r.key_equal_;
|
||||
r.key_equal_ = {};
|
||||
};
|
||||
|
||||
~HashMap()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue