From 67eefebf8d61796a63e6e8e7c79a40564c45d723 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 11 Jan 2023 11:44:09 -0700 Subject: [PATCH] [subset-plan] Simplify user_axes_location destruction --- src/hb-subset-plan.hh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index 7945dc313..6adce8147 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -73,11 +73,7 @@ struct hb_subset_plan_t if (inprogress_accelerator) hb_subset_accelerator_t::destroy ((void*) inprogress_accelerator); - if (user_axes_location) - { - hb_object_destroy (user_axes_location); - hb_free (user_axes_location); - } + hb_hashmap_destroy (user_axes_location); } hb_object_header_t header; @@ -113,11 +109,11 @@ struct hb_subset_plan_t hb_set_t drop_tables; // The glyph subset - hb_map_t *codepoint_to_glyph; + hb_map_t *codepoint_to_glyph; // Needs to be heap-allocated // Old -> New glyph id mapping - hb_map_t *glyph_map; - hb_map_t *reverse_glyph_map; + hb_map_t *glyph_map; // Needs to be heap-allocated + hb_map_t *reverse_glyph_map; // Needs to be heap-allocated hb_map_t glyph_map_gsub; // Plan is only good for a specific source/dest so keep them with it