From a79d0e405b65c9c077a5e29b0b9313a606da691b Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 21 May 2020 07:32:58 +0430 Subject: [PATCH] [subset] minor, use a better type in iteration In file included from hb-ot-face.cc:34: In file included from ./hb-ot-kern-table.hh:30: In file included from ./hb-aat-layout-kerx-table.hh:31: In file included from ./hb-kern.hh:32: In file included from ./hb-ot-layout-gpos-table.hh:32: ./hb-ot-layout-gsubgpos.hh:1878:63: error: loop variable '_' binds to a temporary value produced by a range of type 'decltype((hb_forward>(rhs)(hb_forward, hb_array_t, true>>>>(lhs))))' (aka 'hb_filter_iter_t, hb_array_t, true>>>, hb_map_t &, const (anonymous struct at ./hb-algs.hh:331:1) &>') [-Werror,-Wrange-loop-bind-reference] for (const hb_pair_t&>& _ : + hb_enumerate (ruleSet) ^ ./hb-ot-layout-gsubgpos.hh:1878:10: note: use non-reference type 'hb_pair_t &>' for (const hb_pair_t&>& _ : + hb_enumerate (ruleSet) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/hb-ot-layout-gsubgpos.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index f52a94836..8e839b965 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1875,8 +1875,8 @@ struct ContextFormat2 const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; bool ret = true; unsigned non_zero_index = 0, index = 0; - for (const hb_pair_t&>& _ : + hb_enumerate (ruleSet) - | hb_filter (klass_map, hb_first)) + for (const hb_pair_t&> _ : + hb_enumerate (ruleSet) + | hb_filter (klass_map, hb_first)) { auto *o = out->ruleSet.serialize_append (c->serializer); if (unlikely (!o)) @@ -2032,7 +2032,7 @@ struct ContextFormat3 const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; for (unsigned i = 0; i < (unsigned) lookupCount; i++) c->serializer->copy (lookupRecord[i], lookup_map); - + return_trace (true); }