mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
[algs] Add hb_min() and hb_max()
This commit is contained in:
1 parent
7b863142ce
commit
ecabdffc61
1 file changed
+11
@@ -98,6 +98,17 @@ static const struct
|
||||
operator () (const Pair& pair) const { return pair.second; }
|
||||
} hb_second HB_UNUSED;
|
||||
|
||||
static const struct
|
||||
{
|
||||
template <typename T, typename T2> T
|
||||
operator () (const T& a, const T2& b) const { return a <= b ? a : b; }
|
||||
} hb_min HB_UNUSED;
|
||||
static const struct
|
||||
{
|
||||
template <typename T, typename T2> T
|
||||
operator () (const T& a, const T2& b) const { return a >= b ? a : b; }
|
||||
} hb_max HB_UNUSED;
|
||||
|
||||
|
||||
/*
|
||||
* Bithacks.
|
||||
|
||||
Reference in new issue
Block a user