[map] Minor

This commit is contained in:
Behdad Esfahbod 2018-05-29 17:02:22 -07:00
parent 686476a8ae
commit b6959c33e2
1 changed files with 3 additions and 4 deletions

View File

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