[subset-plan] Simplify drop_tables allocation
This commit is contained in:
parent
b33eb9ecfc
commit
999be72135
|
@ -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 ();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue