From 710d459acac88fd784d4ead0ba75b9aa623c48d4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 May 2019 09:33:09 -0700 Subject: [PATCH] [iter] Default predicates to hb_identity instead of hb_bool The bool conversion happens after predicate is called automatically. --- src/hb-iter.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 6954d431b..aa5eb9cba 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -405,10 +405,10 @@ struct hb_filter_iter_factory_t }; struct { - template hb_filter_iter_factory_t - operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const + operator () (Pred&& p = hb_identity, Proj&& f = hb_identity) const { return hb_filter_iter_factory_t (p, f); } } HB_FUNCOBJ (hb_filter); @@ -649,11 +649,11 @@ HB_FUNCOBJ (hb_unzip); struct { template bool operator () (Iterable&& c, - Pred&& p = hb_bool, + Pred&& p = hb_identity, Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it) @@ -666,11 +666,11 @@ HB_FUNCOBJ (hb_all); struct { template bool operator () (Iterable&& c, - Pred&& p = hb_bool, + Pred&& p = hb_identity, Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it) @@ -683,11 +683,11 @@ HB_FUNCOBJ (hb_any); struct { template bool operator () (Iterable&& c, - Pred&& p = hb_bool, + Pred&& p = hb_identity, Proj&& f = hb_identity) const { for (auto it = hb_iter (c); it; ++it)