diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 485458a4f..86397ff72 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