From 26111a11ad1a648f8075b5289c05c48126cc2d3f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 28 Jun 2020 02:59:47 -0700 Subject: [PATCH] [dagger] Minor cleanup using hb_enumerate --- src/hb-ot-layout-gsubgpos.hh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 8b0e4323c..a708f94b0 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1753,10 +1753,12 @@ struct ContextFormat2 }; return - + hb_enumerate (ruleSet) - | hb_map ([&] (const hb_pair_t &> p) + + hb_iter (ruleSet) + | hb_map (hb_add (this)) + | hb_enumerate + | hb_map ([&] (const hb_pair_t p) { return class_def.intersects_class (glyphs, p.first) && - (this+p.second).intersects (glyphs, lookup_context); }) + p.second.intersects (glyphs, lookup_context); }) | hb_any ; } @@ -2001,7 +2003,7 @@ struct ContextFormat3 out->glyphCount = glyphCount; out->lookupCount = lookupCount; - const hb_array_t> coverages = coverageZ.as_array (glyphCount); + auto coverages = coverageZ.as_array (glyphCount); for (const OffsetTo& offset : coverages) { @@ -2658,10 +2660,12 @@ struct ChainContextFormat2 }; return - + hb_enumerate (ruleSet) - | hb_map ([&] (const hb_pair_t &> p) + + hb_iter (ruleSet) + | hb_map (hb_add (this)) + | hb_enumerate + | hb_map ([&] (const hb_pair_t p) { return input_class_def.intersects_class (glyphs, p.first) && - (this+p.second).intersects (glyphs, lookup_context); }) + p.second.intersects (glyphs, lookup_context); }) | hb_any ; }