[map] More minor
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 30 May 2018 00:31:01 +0000 (17:31 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 30 May 2018 00:31:01 +0000 (17:31 -0700)
src/hb-map-private.hh

index d0909b5..0db060c 100644 (file)
@@ -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
   {