diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 305d9eaec..5238b3504 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -240,7 +240,8 @@ operator | (Lhs lhs, const Rhs &rhs) { return rhs (lhs); } template struct hb_map_iter_t : - hb_iter_t, decltype (hb_declval (Proj) (hb_declval (typename Iter::item_t)))> + hb_iter_t, + decltype (hb_declval (Proj) (hb_declval (typename Iter::item_t)))> { hb_map_iter_t (const Iter& it, Proj&& f) : it (it), f (f) {} @@ -267,7 +268,8 @@ struct hb_map_iter_factory_t template - hb_map_iter_t operator () (const Iterable &c) const + hb_map_iter_t + operator () (const Iterable &c) const { return hb_map_iter_t (c.iter (), f); } private: @@ -306,14 +308,16 @@ struct hb_filter_iter_factory_t template - hb_filter_iter_t operator () (const Iterable &c) const + hb_filter_iter_t + operator () (const Iterable &c) const { return hb_filter_iter_t (c.iter (), p, f); } private: 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); } @@ -322,18 +326,19 @@ hb_filter (Pred&& p = hb_bool, Proj&& f = hb_identity) template struct hb_zip_iter_t : - hb_iter_t, hb_pair_t > + hb_iter_t, + hb_pair_t > { hb_zip_iter_t () {} hb_zip_iter_t (A a, B b) : a (a), b (b) {} typedef hb_pair_t __item_t__; static constexpr bool is_random_access_iterator = - A::is_random_access_iterator && - B::is_random_access_iterator; + A::is_random_access_iterator && + B::is_random_access_iterator; static constexpr bool is_sorted_iterator = - A::is_sorted_iterator && - B::is_sorted_iterator; + A::is_sorted_iterator && + B::is_sorted_iterator; __item_t__ __item__ () const { return __item_t__ (*a, *b); } __item_t__ __item_at__ (unsigned i) const { return __item_t__ (a[i], b[i]); } bool __more__ () const { return a && b; }