[map] Rename item clear() to construct()

This commit is contained in:
Behdad Esfahbod 2022-11-17 15:50:00 -07:00
parent fc22d706fe
commit e93c01c3ae
1 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ struct hb_hashmap_t
return minus_1;
};
void clear ()
void construct ()
{
new (std::addressof (key)) K ();
new (std::addressof (value)) V ();
@ -171,7 +171,7 @@ struct hb_hashmap_t
return false;
}
for (auto &_ : hb_iter (new_items, new_size))
_.clear ();
_.construct ();
unsigned int old_size = mask + 1;
item_t *old_items = items;
@ -237,7 +237,7 @@ struct hb_hashmap_t
if (unlikely (!successful)) return;
for (auto &_ : hb_iter (items, mask ? mask + 1 : 0))
_.clear ();
_.construct ();
population = occupancy = 0;
}