[map] Fix resize during copy-construction/assignment
This commit is contained in:
parent
3aad7c2ddf
commit
41f4bdac35
|
@ -43,9 +43,9 @@ struct hb_hashmap_t
|
||||||
hb_hashmap_t () { init (); }
|
hb_hashmap_t () { init (); }
|
||||||
~hb_hashmap_t () { fini (); }
|
~hb_hashmap_t () { fini (); }
|
||||||
|
|
||||||
hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () { resize (population); hb_copy (o, *this); }
|
hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () { resize (o.population); hb_copy (o, *this); }
|
||||||
hb_hashmap_t (hb_hashmap_t&& o) : hb_hashmap_t () { hb_swap (*this, o); }
|
hb_hashmap_t (hb_hashmap_t&& o) : hb_hashmap_t () { hb_swap (*this, o); }
|
||||||
hb_hashmap_t& operator= (const hb_hashmap_t& o) { resize (population); hb_copy (o, *this); return *this; }
|
hb_hashmap_t& operator= (const hb_hashmap_t& o) { resize (o.population); hb_copy (o, *this); return *this; }
|
||||||
hb_hashmap_t& operator= (hb_hashmap_t&& o) { hb_swap (*this, o); return *this; }
|
hb_hashmap_t& operator= (hb_hashmap_t&& o) { hb_swap (*this, o); return *this; }
|
||||||
|
|
||||||
hb_hashmap_t (std::initializer_list<hb_pair_t<K, V>> lst) : hb_hashmap_t ()
|
hb_hashmap_t (std::initializer_list<hb_pair_t<K, V>> lst) : hb_hashmap_t ()
|
||||||
|
|
Loading…
Reference in New Issue