From 7bd101728ac1c0223f9f4cda50d37e006bb069da Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 17 Nov 2022 15:01:55 -0700 Subject: [PATCH] [map] Minor use hb_iter instead of hb_array --- src/hb-map.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hb-map.hh b/src/hb-map.hh index 77bd03e86..2eb235ac8 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -234,9 +234,8 @@ struct hb_hashmap_t { if (unlikely (!successful)) return; - if (items) - for (auto &_ : hb_iter (items, mask + 1)) - _.clear (); + for (auto &_ : hb_iter (items, mask ? mask + 1 : 0)) + _.clear (); population = occupancy = 0; } @@ -273,7 +272,7 @@ struct hb_hashmap_t auto iter_items () const HB_AUTO_RETURN ( - + hb_array (items, mask ? mask + 1 : 0) + + hb_iter (items, mask ? mask + 1 : 0) | hb_filter (&item_t::is_real) ) auto iter_ref () const HB_AUTO_RETURN