diff --git a/src/hb-map.hh b/src/hb-map.hh index 028e4654b..f91da642d 100644 --- a/src/hb-map.hh +++ b/src/hb-map.hh @@ -94,6 +94,7 @@ struct hb_hashmap_t bool operator == (const K &o) { return hb_deref (key) == hb_deref (o); } bool operator == (const item_t &o) { return *this == o.key; } hb_pair_t get_pair() const { return hb_pair_t (key, value); } + hb_pair_t get_pair_ref() const { return hb_pair_t (key, value); } uint32_t total_hash () const { return (hash * 31) + hb_hash (value); } @@ -281,6 +282,12 @@ struct hb_hashmap_t | hb_filter (&item_t::is_real) | hb_map (&item_t::get_pair) ) + auto iter_ref () const HB_AUTO_RETURN + ( + + hb_array (items, mask ? mask + 1 : 0) + | hb_filter (&item_t::is_real) + | hb_map (&item_t::get_pair) + ) auto keys () const HB_AUTO_RETURN ( + hb_array (items, mask ? mask + 1 : 0)