From f5ef8a7347656ad5f5bb8cec5f9a3de262a79411 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 29 Mar 2019 21:57:17 -0700 Subject: [PATCH] [iter] Port one more function to dagger --- src/hb-ot-layout-gpos-table.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 485458a4..86397ff7 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -722,12 +722,14 @@ struct PairPosFormat1 { bool intersects (const hb_set_t *glyphs) const { - for (auto it = hb_zip (this+coverage, pairSet) - | hb_filter (*glyphs, hb_first) - | hb_map (hb_second); it; ++it) - if ((this+*it).intersects (glyphs, valueFormat)) - return true; - return false; + return + + hb_zip (this+coverage, pairSet) + | hb_filter (*glyphs, hb_first) + | hb_map (hb_second) + | hb_map ([&] (const OffsetTo &_) -> bool + { return (this+_).intersects (glyphs, valueFormat); }) + | hb_any + ; } void collect_glyphs (hb_collect_glyphs_context_t *c) const -- GitLab