From 71157a4520ae5cdbbeb197a979ae02b484856686 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 28 Jan 2019 21:20:12 -0500 Subject: [PATCH] [meta] Remove _ft struct names Using decltype() instead. --- src/hb-algs.hh | 8 ++++---- src/hb-iter.hh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 5ce40acf1..d03906c4a 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -31,13 +31,13 @@ #include "hb-null.hh" -static const struct hb_identity_ft +static const struct { template T operator () (const T& v) const { return v; } } hb_identity HB_UNUSED; -static const struct hb_bool_ft +static const struct { template bool operator () (const T& v) const { return bool (v); } @@ -61,13 +61,13 @@ struct hb_pair_t template static inline hb_pair_t hb_pair (T1 a, T2 b) { return hb_pair_t (a, b); } -static const struct hb_first_ft +static const struct { template decltype (hb_declval (Pair).first) operator () (const Pair& pair) const { return pair.first; } } hb_first HB_UNUSED; -static const struct hb_second_ft +static const struct { template decltype (hb_declval (Pair).second) operator () (const Pair& pair) const { return pair.second; } diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 2e767efd2..532918280 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -301,7 +301,7 @@ struct hb_filter_iter_factory_t Pred p; Proj f; }; -template +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); }