[map] Adjust resizing criteria

pull/4228/head
Behdad Esfahbod 2 years ago
parent f04d08b883
commit 1fa4b41531
  1. 2
      src/hb-map.hh

@ -204,7 +204,7 @@ struct hb_hashmap_t
bool set_with_hash (KK&& key, uint32_t hash, VV&& value, bool is_delete=false)
{
if (unlikely (!successful)) return false;
if (unlikely ((occupancy + occupancy / 2) >= mask && !resize ())) return false;
if (unlikely ((occupancy + occupancy) >= mask && !resize ())) return false;
item_t &item = item_for_hash (key, hash);
if (is_delete && !(item == key))

Loading…
Cancel
Save