[bimap] Remove init/fini
This commit is contained in:
parent
c3dd21f110
commit
de2cef42b4
|
@ -33,20 +33,6 @@
|
|||
/* Bi-directional map */
|
||||
struct hb_bimap_t
|
||||
{
|
||||
/* XXX(remove) */
|
||||
void init ()
|
||||
{
|
||||
forw_map.init ();
|
||||
back_map.init ();
|
||||
}
|
||||
|
||||
/* XXX(remove) */
|
||||
void fini ()
|
||||
{
|
||||
forw_map.fini ();
|
||||
back_map.fini ();
|
||||
}
|
||||
|
||||
void reset ()
|
||||
{
|
||||
forw_map.reset ();
|
||||
|
|
|
@ -2930,8 +2930,6 @@ struct VariationStore
|
|||
|
||||
hb_vector_t<hb_inc_bimap_t> inner_maps;
|
||||
inner_maps.resize ((unsigned) dataSets.len);
|
||||
for (unsigned i = 0; i < inner_maps.length; i++)
|
||||
inner_maps[i].init ();
|
||||
|
||||
for (unsigned idx : c->plan->layout_variation_indices->iter ())
|
||||
{
|
||||
|
@ -2939,18 +2937,11 @@ struct VariationStore
|
|||
uint16_t minor = idx & 0xFFFF;
|
||||
|
||||
if (major >= inner_maps.length)
|
||||
{
|
||||
for (unsigned i = 0; i < inner_maps.length; i++)
|
||||
inner_maps[i].fini ();
|
||||
return_trace (false);
|
||||
}
|
||||
inner_maps[major].add (minor);
|
||||
}
|
||||
varstore_prime->serialize (c->serializer, this, inner_maps.as_array ());
|
||||
|
||||
for (unsigned i = 0; i < inner_maps.length; i++)
|
||||
inner_maps[i].fini ();
|
||||
|
||||
return_trace (
|
||||
!c->serializer->in_error()
|
||||
&& varstore_prime->dataSets);
|
||||
|
|
|
@ -177,9 +177,6 @@ struct hvarvvar_subset_plan_t
|
|||
|
||||
inner_maps.resize (var_store->get_sub_table_count ());
|
||||
|
||||
for (unsigned int i = 0; i < inner_maps.length; i++)
|
||||
inner_maps[i].init ();
|
||||
|
||||
if (unlikely (!index_map_plans.length || !inner_sets.length || !inner_maps.length)) return;
|
||||
|
||||
bool retain_adv_map = false;
|
||||
|
@ -229,8 +226,8 @@ struct hvarvvar_subset_plan_t
|
|||
for (unsigned int i = 0; i < inner_sets.length; i++)
|
||||
hb_set_destroy (inner_sets[i]);
|
||||
hb_set_destroy (adv_set);
|
||||
inner_maps.fini_deep ();
|
||||
index_map_plans.fini_deep ();
|
||||
inner_maps.fini ();
|
||||
index_map_plans.fini ();
|
||||
}
|
||||
|
||||
hb_inc_bimap_t outer_map;
|
||||
|
|
|
@ -526,19 +526,9 @@ struct subr_remap_t : hb_inc_bimap_t
|
|||
|
||||
struct subr_remaps_t
|
||||
{
|
||||
subr_remaps_t ()
|
||||
{
|
||||
global_remap.init ();
|
||||
local_remaps.init ();
|
||||
}
|
||||
|
||||
~subr_remaps_t () { fini (); }
|
||||
|
||||
void init (unsigned int fdCount)
|
||||
{
|
||||
if (unlikely (!local_remaps.resize (fdCount))) return;
|
||||
for (unsigned int i = 0; i < fdCount; i++)
|
||||
local_remaps[i].init ();
|
||||
local_remaps.resize (fdCount);
|
||||
}
|
||||
|
||||
bool in_error()
|
||||
|
@ -553,12 +543,6 @@ struct subr_remaps_t
|
|||
local_remaps[i].create (closures.local_closures[i]);
|
||||
}
|
||||
|
||||
void fini ()
|
||||
{
|
||||
global_remap.fini ();
|
||||
local_remaps.fini_deep ();
|
||||
}
|
||||
|
||||
subr_remap_t global_remap;
|
||||
hb_vector_t<subr_remap_t> local_remaps;
|
||||
};
|
||||
|
@ -577,7 +561,6 @@ struct subr_subsetter_t
|
|||
~subr_subsetter_t ()
|
||||
{
|
||||
closures.fini ();
|
||||
remaps.fini ();
|
||||
parsed_charstrings.fini_deep ();
|
||||
parsed_global_subrs.fini_deep ();
|
||||
parsed_local_subrs.fini_deep ();
|
||||
|
|
|
@ -371,14 +371,10 @@ struct cff_subset_plan {
|
|||
{
|
||||
topdict_mod.init ();
|
||||
subset_fdselect_ranges.init ();
|
||||
fdmap.init ();
|
||||
subset_charstrings.init ();
|
||||
subset_globalsubrs.init ();
|
||||
subset_localsubrs.init ();
|
||||
fontdicts_mod.init ();
|
||||
subset_enc_code_ranges.init ();
|
||||
subset_charset_ranges.init ();
|
||||
sidmap.init ();
|
||||
for (unsigned int i = 0; i < name_dict_values_t::ValCount; i++)
|
||||
topDictModSIDs[i] = CFF_UNDEF_SID;
|
||||
}
|
||||
|
@ -387,14 +383,10 @@ struct cff_subset_plan {
|
|||
{
|
||||
topdict_mod.fini ();
|
||||
subset_fdselect_ranges.fini ();
|
||||
fdmap.fini ();
|
||||
subset_charstrings.fini_deep ();
|
||||
subset_globalsubrs.fini_deep ();
|
||||
subset_localsubrs.fini_deep ();
|
||||
fontdicts_mod.fini ();
|
||||
subset_enc_code_ranges.fini ();
|
||||
subset_charset_ranges.fini ();
|
||||
sidmap.fini ();
|
||||
}
|
||||
|
||||
void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan)
|
||||
|
|
|
@ -242,7 +242,6 @@ struct cff2_subset_plan {
|
|||
desubroutinize (false)
|
||||
{
|
||||
subset_fdselect_ranges.init ();
|
||||
fdmap.init ();
|
||||
subset_charstrings.init ();
|
||||
subset_globalsubrs.init ();
|
||||
subset_localsubrs.init ();
|
||||
|
@ -251,7 +250,6 @@ struct cff2_subset_plan {
|
|||
~cff2_subset_plan ()
|
||||
{
|
||||
subset_fdselect_ranges.fini ();
|
||||
fdmap.fini ();
|
||||
subset_charstrings.fini_deep ();
|
||||
subset_globalsubrs.fini_deep ();
|
||||
subset_localsubrs.fini_deep ();
|
||||
|
|
Loading…
Reference in New Issue