diff --git a/src/hb-map-private.hh b/src/hb-map-private.hh index d0909b596..0db060c4e 100644 --- a/src/hb-map-private.hh +++ b/src/hb-map-private.hh @@ -133,15 +133,17 @@ struct hb_map_t if (!items[i].is_unused ()) { occupancy--; - if (items[i].value != INVALID) + if (items[i].is_tombstone ()) population--; } - occupancy++; - if (value != INVALID) - population++; items[i].key = key; items[i].value = value; + + occupancy++; + if (!items[i].is_tombstone ()) + population++; + } inline hb_codepoint_t get (hb_codepoint_t key) const {