[subset-plan] Avoid a copy in freeing name-table-overrides

This commit is contained in:
Behdad Esfahbod 2023-06-22 18:46:33 -06:00
parent d8fba5c6b0
commit cb5f4d0c68
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ struct hb_hashmap_t
bool operator == (const K &o) const { return hb_deref (key) == hb_deref (o); }
bool operator == (const item_t &o) const { return *this == o.key; }
hb_pair_t<K, V> get_pair() const { return hb_pair_t<K, V> (key, value); }
hb_pair_t<const K &, const V &> get_pair_ref() const { return hb_pair_t<const K &, const V &> (key, value); }
hb_pair_t<const K &, V &> get_pair_ref() { return hb_pair_t<const K &, V &> (key, value); }
uint32_t total_hash () const
{ return (hash * 31) + hb_hash (value); }

View file

@ -82,7 +82,7 @@ struct hb_subset_plan_t
hb_map_destroy (reverse_glyph_map);
#ifdef HB_EXPERIMENTAL_API
for (auto _ : name_table_overrides)
for (auto _ : name_table_overrides.iter_ref ())
_.second.fini ();
#endif