From cfb48f91da9089c8f9ea0069c4e001562980b7e9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 11 Jan 2023 10:45:02 -0700 Subject: [PATCH] [subset-plan] Simplify name_languages allocation --- src/hb-subset-plan.cc | 2 +- src/hb-subset-plan.hh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index 6cc147cf5..7e2e1a7b8 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -843,7 +843,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face, plan->unicode_to_new_gid_list.init (); plan->name_ids = hb_set_copy (input->sets.name_ids); - plan->name_languages = hb_set_copy (input->sets.name_languages); + plan->name_languages = *input->sets.name_languages; plan->layout_features = *input->sets.layout_features; plan->layout_scripts = *input->sets.layout_scripts; plan->glyphs_requested = hb_set_copy (input->sets.glyphs); diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index 100d6428e..870d28ab6 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -50,7 +50,6 @@ struct hb_subset_plan_t { hb_set_destroy (unicodes); hb_set_destroy (name_ids); - hb_set_destroy (name_languages); hb_set_destroy (glyphs_requested); hb_set_destroy (drop_tables); hb_set_destroy (no_subset_tables); @@ -119,7 +118,7 @@ struct hb_subset_plan_t hb_set_t *name_ids; // name_languages we would like to retain - hb_set_t *name_languages; + hb_set_t name_languages; //layout features which will be preserved hb_set_t layout_features;