[map] Simplify (de)construction of item_t
This commit is contained in:
parent
99103bd976
commit
7f83040836
|
@ -90,16 +90,14 @@ struct hb_hashmap_t
|
||||||
|
|
||||||
void construct ()
|
void construct ()
|
||||||
{
|
{
|
||||||
new (std::addressof (key)) K ();
|
new (this) item_t ();
|
||||||
new (std::addressof (value)) V ();
|
|
||||||
hash = 0;
|
hash = 0;
|
||||||
is_used_ = false;
|
is_used_ = false;
|
||||||
is_tombstone_ = false;
|
is_tombstone_ = false;
|
||||||
}
|
}
|
||||||
void reconstruct ()
|
void reconstruct ()
|
||||||
{
|
{
|
||||||
key.~K ();
|
this->~item_t ();
|
||||||
value.~V ();
|
|
||||||
construct ();
|
construct ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue