[algs] Don't forward rvalue twice

Part of https://github.com/harfbuzz/harfbuzz/issues/2293
This commit is contained in:
Behdad Esfahbod 2020-11-30 16:38:53 -07:00
parent 53806e5b83
commit 7c241651ac
1 changed files with 2 additions and 2 deletions

View File

@ -350,14 +350,14 @@ struct
{ {
template <typename T, typename T2> constexpr auto template <typename T, typename T2> constexpr auto
operator () (T&& a, T2&& b) const HB_AUTO_RETURN operator () (T&& a, T2&& b) const HB_AUTO_RETURN
(hb_forward<T> (a) <= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b)) (a <= b ? hb_forward<T> (a) : hb_forward<T2> (b))
} }
HB_FUNCOBJ (hb_min); HB_FUNCOBJ (hb_min);
struct struct
{ {
template <typename T, typename T2> constexpr auto template <typename T, typename T2> constexpr auto
operator () (T&& a, T2&& b) const HB_AUTO_RETURN operator () (T&& a, T2&& b) const HB_AUTO_RETURN
(hb_forward<T> (a) >= hb_forward<T2> (b) ? hb_forward<T> (a) : hb_forward<T2> (b)) (a >= b ? hb_forward<T> (a) : hb_forward<T2> (b))
} }
HB_FUNCOBJ (hb_max); HB_FUNCOBJ (hb_max);
struct struct