[map] More minor

This commit is contained in:
Behdad Esfahbod 2018-05-29 17:31:01 -07:00
parent f76c4a7708
commit a9fa39dca5
1 changed files with 6 additions and 4 deletions

View File

@ -133,15 +133,17 @@ struct hb_map_t
if (!items[i].is_unused ()) if (!items[i].is_unused ())
{ {
occupancy--; occupancy--;
if (items[i].value != INVALID) if (items[i].is_tombstone ())
population--; population--;
} }
occupancy++;
if (value != INVALID)
population++;
items[i].key = key; items[i].key = key;
items[i].value = value; items[i].value = value;
occupancy++;
if (!items[i].is_tombstone ())
population++;
} }
inline hb_codepoint_t get (hb_codepoint_t key) const inline hb_codepoint_t get (hb_codepoint_t key) const
{ {