mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 23:41:03 +01:00
[iter] Make hb_filter() a function-object
This commit is contained in:
1 parent
aa4c321262
commit
00db94095d
1 file changed
+8
-5
+8
-5
@@ -322,11 +322,14 @@ struct hb_filter_iter_factory_t
|
||||
Pred p;
|
||||
Proj f;
|
||||
};
|
||||
template <typename Pred = decltype ((hb_bool)),
|
||||
typename Proj = decltype ((hb_identity))>
|
||||
inline hb_filter_iter_factory_t<Pred, Proj>
|
||||
hb_filter (Pred&& p = hb_bool, Proj&& f = hb_identity)
|
||||
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
|
||||
static const struct
|
||||
{
|
||||
template <typename Pred = decltype ((hb_bool)),
|
||||
typename Proj = decltype ((hb_identity))>
|
||||
hb_filter_iter_factory_t<Pred, Proj>
|
||||
operator () (Pred&& p = hb_bool, Proj&& f = hb_identity) const
|
||||
{ return hb_filter_iter_factory_t<Pred, Proj> (p, f); }
|
||||
} hb_filter HB_UNUSED;
|
||||
|
||||
/* hb_zip() */
|
||||
|
||||
|
||||
Reference in new issue
Block a user