Minor, turn more of hb_apply to for each
This commit is contained in:
parent
0665dce116
commit
6e42a418c8
|
@ -144,9 +144,8 @@ struct glyf
|
||||||
{
|
{
|
||||||
TRACE_SERIALIZE (this);
|
TRACE_SERIALIZE (this);
|
||||||
|
|
||||||
+ it
|
for (const SubsetGlyph& _ : it)
|
||||||
| hb_apply ([=] (const SubsetGlyph& _) { _.serialize (c, plan); })
|
_.serialize (c, plan);
|
||||||
;
|
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,9 +512,8 @@ struct SinglePosFormat1
|
||||||
|
|
||||||
auto vals = hb_second (*it);
|
auto vals = hb_second (*it);
|
||||||
|
|
||||||
+ vals
|
for (const Value& _ : vals)
|
||||||
| hb_apply ([=] (const Value& _) { c->copy (_); })
|
c->copy (_);
|
||||||
;
|
|
||||||
|
|
||||||
auto glyphs =
|
auto glyphs =
|
||||||
+ it
|
+ it
|
||||||
|
@ -601,15 +600,10 @@ struct SinglePosFormat2
|
||||||
if (unlikely (!c->check_assign (valueFormat, valFormat))) return;
|
if (unlikely (!c->check_assign (valueFormat, valFormat))) return;
|
||||||
if (unlikely (!c->check_assign (valueCount, it.len ()))) return;
|
if (unlikely (!c->check_assign (valueCount, it.len ()))) return;
|
||||||
|
|
||||||
+ it
|
for (hb_array_t<const Value> val_iter : + it
|
||||||
| hb_map (hb_second)
|
| hb_map (hb_second))
|
||||||
| hb_apply ([=] (hb_array_t<const Value> val_iter)
|
for (const Value& _ : val_iter)
|
||||||
{
|
c->copy (_);
|
||||||
+ val_iter
|
|
||||||
| hb_apply ([=] (const Value& _) { c->copy (_); })
|
|
||||||
;
|
|
||||||
})
|
|
||||||
;
|
|
||||||
|
|
||||||
auto glyphs =
|
auto glyphs =
|
||||||
+ it
|
+ it
|
||||||
|
@ -675,22 +669,14 @@ struct SinglePos
|
||||||
unsigned subset_format = 1;
|
unsigned subset_format = 1;
|
||||||
hb_array_t<const Value> first_val_iter = hb_second (*glyph_val_iter_pairs);
|
hb_array_t<const Value> first_val_iter = hb_second (*glyph_val_iter_pairs);
|
||||||
|
|
||||||
+ glyph_val_iter_pairs
|
for (hb_array_t<const Value> val_iter : + glyph_val_iter_pairs
|
||||||
| hb_map (hb_second)
|
| hb_map (hb_second))
|
||||||
| hb_apply ([&] (hb_array_t<const Value> val_iter)
|
for (const hb_pair_t<Value, Value>& _ : hb_zip (val_iter, first_val_iter))
|
||||||
{
|
|
||||||
+ hb_zip (val_iter, first_val_iter)
|
|
||||||
| hb_apply ([&] (const hb_pair_t<Value, Value>& _)
|
|
||||||
{
|
|
||||||
if (_.first != _.second)
|
if (_.first != _.second)
|
||||||
{
|
{
|
||||||
subset_format = 2;
|
subset_format = 2;
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
})
|
|
||||||
;
|
|
||||||
})
|
|
||||||
;
|
|
||||||
|
|
||||||
return subset_format;
|
return subset_format;
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,9 +191,8 @@ struct name
|
||||||
|
|
||||||
const void *dst_string_pool = &(this + this->stringOffset);
|
const void *dst_string_pool = &(this + this->stringOffset);
|
||||||
|
|
||||||
+ it
|
for (const NameRecord& _ : it)
|
||||||
| hb_apply ([=] (const NameRecord& _) { c->copy (_, src_string_pool, dst_string_pool); })
|
c->copy (_, src_string_pool, dst_string_pool);
|
||||||
;
|
|
||||||
|
|
||||||
if (unlikely (c->ran_out_of_room)) return_trace (false);
|
if (unlikely (c->ran_out_of_room)) return_trace (false);
|
||||||
|
|
||||||
|
|
|
@ -84,9 +84,8 @@ struct VORG
|
||||||
this->defaultVertOriginY = defaultVertOriginY;
|
this->defaultVertOriginY = defaultVertOriginY;
|
||||||
this->vertYOrigins.len = it.len ();
|
this->vertYOrigins.len = it.len ();
|
||||||
|
|
||||||
+ it
|
for (const VertOriginMetric& _ : it)
|
||||||
| hb_apply ([c] (const VertOriginMetric& _) { c->copy (_); })
|
c->copy (_);
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool subset (hb_subset_context_t *c) const
|
bool subset (hb_subset_context_t *c) const
|
||||||
|
|
Loading…
Reference in New Issue