Revert "Avoid use values () in hb-hashmap if value_t has an overriden operator &"
This reverts commit b92e4cc009
.
This commit is contained in:
parent
ff0d0d020e
commit
ebc382a847
|
@ -249,13 +249,12 @@ hb_subset_input_destroy (hb_subset_input_t *input)
|
||||||
|
|
||||||
hb_hashmap_destroy (input->axes_location);
|
hb_hashmap_destroy (input->axes_location);
|
||||||
|
|
||||||
#ifdef HB_EXPERIMENTAL_API
|
|
||||||
if (input->name_table_overrides)
|
if (input->name_table_overrides)
|
||||||
{
|
{
|
||||||
for (auto _ : *input->name_table_overrides)
|
for (auto _ : input->name_table_overrides->values ())
|
||||||
_.second.fini ();
|
_.fini ();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
hb_hashmap_destroy (input->name_table_overrides);
|
hb_hashmap_destroy (input->name_table_overrides);
|
||||||
|
|
||||||
hb_free (input);
|
hb_free (input);
|
||||||
|
|
|
@ -849,7 +849,6 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
plan->check_success (plan->hmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ());
|
plan->check_success (plan->hmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ());
|
||||||
|
|
||||||
plan->check_success (plan->name_table_overrides = hb_hashmap_create<unsigned, hb_bytes_t> ());
|
plan->check_success (plan->name_table_overrides = hb_hashmap_create<unsigned, hb_bytes_t> ());
|
||||||
#ifdef HB_EXPERIMENTAL_API
|
|
||||||
if (plan->name_table_overrides && input->name_table_overrides)
|
if (plan->name_table_overrides && input->name_table_overrides)
|
||||||
{
|
{
|
||||||
for (auto _ : *input->name_table_overrides)
|
for (auto _ : *input->name_table_overrides)
|
||||||
|
@ -861,8 +860,8 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
char *name_str = (char *) hb_malloc (len);
|
char *name_str = (char *) hb_malloc (len);
|
||||||
if (unlikely (!plan->check_success (name_str)))
|
if (unlikely (!plan->check_success (name_str)))
|
||||||
{
|
{
|
||||||
for (auto pair : *plan->name_table_overrides)
|
for (auto bytes : plan->name_table_overrides->values ())
|
||||||
pair.second.fini ();
|
bytes.fini ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,7 +869,7 @@ hb_subset_plan_create_or_fail (hb_face_t *face,
|
||||||
plan->name_table_overrides->set (name_id, hb_bytes_t (name_str, len));
|
plan->name_table_overrides->set (name_id, hb_bytes_t (name_str, len));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void* accel = hb_face_get_user_data(face, hb_subset_accelerator_t::user_data_key());
|
void* accel = hb_face_get_user_data(face, hb_subset_accelerator_t::user_data_key());
|
||||||
|
|
||||||
|
|
|
@ -87,13 +87,11 @@ struct hb_subset_plan_t
|
||||||
hb_hashmap_destroy (vmtx_map);
|
hb_hashmap_destroy (vmtx_map);
|
||||||
hb_hashmap_destroy (layout_variation_idx_delta_map);
|
hb_hashmap_destroy (layout_variation_idx_delta_map);
|
||||||
|
|
||||||
#ifdef HB_EXPERIMENTAL_API
|
|
||||||
if (name_table_overrides)
|
if (name_table_overrides)
|
||||||
{
|
{
|
||||||
for (auto _ : *name_table_overrides)
|
for (auto _ : name_table_overrides->values ())
|
||||||
_.second.fini ();
|
_.fini ();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
hb_hashmap_destroy (name_table_overrides);
|
hb_hashmap_destroy (name_table_overrides);
|
||||||
|
|
||||||
if (user_axes_location)
|
if (user_axes_location)
|
||||||
|
|
Loading…
Reference in New Issue