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

index 07d5d0d..7611021 100644 (file)
@@ -132,12 +132,11 @@ struct hb_map_t
       return; /* Trying to delete non-existent key. */
 
     /* Accounting. */
-    if (items[i].is_tombstone ())
-      occupancy--;
-    else if (!items[i].is_unused ())
+    if (!items[i].is_unused ())
     {
-      population--;
       occupancy--;
+      if (items[i].value != INVALID)
+       population--;
     }
     occupancy++;
     if (value != INVALID)