mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix uninitialized values of hashmap propagating in move
This commit is contained in:
parent
088950f793
commit
81f49a2cf8
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