[algs] Add hb_min() and hb_max()

pull/1656/head
Behdad Esfahbod 6 years ago
parent 7b863142ce
commit ecabdffc61
  1. 11
      src/hb-algs.hh

@ -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.

Loading…
Cancel
Save