mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +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
|
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()
|
~HashMap()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue