From 00db94095d53bd5e954be31caa428a3fd8f5f4c2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 14 Feb 2019 11:10:13 -0800 Subject: [PATCH] [iter] Make hb_filter() a function-object --- src/hb-iter.hh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index fefd81ee4..24a10f311 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -322,11 +322,14 @@ struct hb_filter_iter_factory_t Pred p; Proj f; }; -template -inline hb_filter_iter_factory_t -hb_filter (Pred&& p = hb_bool, Proj&& f = hb_identity) -{ return hb_filter_iter_factory_t (p, f); } +static const struct +{ + template + hb_filter_iter_factory_t + operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const + { return hb_filter_iter_factory_t (p, f); } +} hb_filter HB_UNUSED; /* hb_zip() */