From 294d520f6542198fa6cf08764f7732fe138e5c97 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Sat, 30 Mar 2019 13:58:22 -0700 Subject: [PATCH] more iter changes from master --- src/hb-iter.hh | 4 ++-- src/hb-ot-layout-gsubgpos.hh | 12 ++++++------ src/test-iter.cc | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 28fc31e1f..203a3c7ef 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -552,7 +552,7 @@ static const struct operator () (Iterable&& c) const { for (auto it = hb_iter (c); it; ++it) - if (it) + if (*it) return true; return false; } @@ -566,7 +566,7 @@ static const struct operator () (Iterable&& c) const { for (auto it = hb_iter (c); it; ++it) - if (it) + if (*it) return false; return true; } diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 896c856c7..96777dead 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1546,9 +1546,9 @@ struct ContextFormat2 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_map ([&] (const hb_pair_t &> p) -> bool + { return class_def.intersects_class (glyphs, p.first) && + (this+p.second).intersects (glyphs, lookup_context); }) | hb_any ; } @@ -2193,9 +2193,9 @@ struct ChainContextFormat2 return + hb_enumerate (ruleSet) - | hb_filter ([&] (const hb_pair_t &> p) -> bool - { return input_class_def.intersects_class (glyphs, p.first) && - (this+p.second).intersects (glyphs, lookup_context); }) + | hb_map ([&] (const hb_pair_t &> p) -> bool + { return input_class_def.intersects_class (glyphs, p.first) && + (this+p.second).intersects (glyphs, lookup_context); }) | hb_any ; } diff --git a/src/test-iter.cc b/src/test-iter.cc index 7dfa0a917..bc45488eb 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -137,7 +137,7 @@ main (int argc, char **argv) test_iterator (hb_zip (st, v)); - hb_any (hb_zip (st, v)); + hb_any (st); hb_array_t > pa; pa->as_array ();