[subset-plan] Simplify drop_tables allocation

This commit is contained in:
Behdad Esfahbod 2023-01-11 11:21:17 -07:00
parent b33eb9ecfc
commit 999be72135
3 changed files with 3 additions and 4 deletions

View File

@ -847,7 +847,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
plan->layout_features = *input->sets.layout_features;
plan->layout_scripts = *input->sets.layout_scripts;
plan->glyphs_requested = hb_set_copy (input->sets.glyphs);
plan->drop_tables = hb_set_copy (input->sets.drop_tables);
plan->drop_tables = *input->sets.drop_tables;
plan->no_subset_tables = hb_set_copy (input->sets.no_subset_tables);
plan->source = hb_face_reference (face);
plan->dest = hb_face_builder_create ();

View File

@ -50,7 +50,6 @@ struct hb_subset_plan_t
{
hb_set_destroy (unicodes);
hb_set_destroy (glyphs_requested);
hb_set_destroy (drop_tables);
hb_set_destroy (no_subset_tables);
hb_face_destroy (source);
hb_face_destroy (dest);
@ -114,7 +113,7 @@ struct hb_subset_plan_t
hb_set_t *no_subset_tables;
// Tables which should be dropped.
hb_set_t *drop_tables;
hb_set_t drop_tables;
// The glyph subset
hb_map_t *codepoint_to_glyph;

View File

@ -355,7 +355,7 @@ _is_table_present (hb_face_t *source, hb_tag_t tag)
static bool
_should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
{
if (plan->drop_tables->has (tag))
if (plan->drop_tables.has (tag))
return true;
switch (tag)