From bcab098c8f35ac4bef6618d949a7bf1d95869fa5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 29 Mar 2019 21:49:18 -0700 Subject: [PATCH] [iter] Port more code to daggers --- src/hb-ot-layout-gsub-table.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 1c70f600..b69f3498 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -842,12 +842,14 @@ struct LigatureSubstFormat1 { bool intersects (const hb_set_t *glyphs) const { - for (auto it = hb_zip (this+coverage, ligatureSet) - | hb_filter (*glyphs, hb_first) - | hb_map (hb_second); it; ++it) - if ((this+*it).intersects (glyphs)) - return true; - return false; + return + + hb_zip (this+coverage, ligatureSet) + | hb_filter (*glyphs, hb_first) + | hb_map (hb_second) + | hb_map ([&] (const OffsetTo &_) -> bool + { return (this+_).intersects (glyphs); }) + | hb_any + ; } void closure (hb_closure_context_t *c) const -- GitLab