diff --git a/src/hb-algs.hh b/src/hb-algs.hh index b4e79e8abcdbd61f54fe21fbbb74be5b37901860..85f4f56d51e256ff1ea44000d859048cfff40fb2 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -35,7 +35,7 @@ template inline typename T::iter_t hb_iter (const T& c) { return c.iter (); } -static HB_UNUSED struct hb_identity_t +static HB_UNUSED const struct hb_identity_t { template T operator () (const T& v) const { return v; } @@ -59,13 +59,13 @@ struct hb_pair_t template static inline hb_pair_t hb_pair (T1 a, T2 b) { return hb_pair_t (a, b); } -static HB_UNUSED struct hb_first_t +static HB_UNUSED const struct hb_first_t { template typename Pair::first_t operator () (const Pair& pair) const { return pair.first; } } hb_first; -static HB_UNUSED struct hb_second_t +static HB_UNUSED const struct hb_second_t { template typename Pair::second_t operator () (const Pair& pair) const { return pair.second; } diff --git a/src/hb-iter.hh b/src/hb-iter.hh index b538ddf02c250a16548a15304987f82141d45a29..da93a5b3749037237bee0c458546ab2ab58815d8 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -280,7 +280,7 @@ struct hb_filter_iter_factory_t Pred p; Proj f; }; -template +template inline hb_filter_iter_factory_t hb_filter (Pred&& p, Proj&& f = hb_identity) { return hb_filter_iter_factory_t (p, f); }