From 668d2d562fec797d779c6d6a43eb6e1c7cfbc07a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 29 Mar 2019 22:48:38 -0700 Subject: [PATCH] [iter] One more dagger --- src/hb-ot-layout-gsubgpos.hh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 1ecddbfd1..9581e6194 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1544,12 +1544,13 @@ struct ContextFormat2 &class_def }; - for (auto it = hb_enumerate (ruleSet); it; ++it) - if (class_def.intersects_class (glyphs, (*it).first) && - (this+(*it).second).intersects (glyphs, lookup_context)) - return true; - - return false; + return + + hb_enumerate (ruleSet) + | hb_filter ([&] (const hb_pair_t &> p) -> bool + { return class_def.intersects_class (glyphs, p.first) && + (this+p.second).intersects (glyphs, lookup_context); }) + | hb_any + ; } void closure (hb_closure_context_t *c) const