[algs] Don't forward rvalue twice
Part of https://github.com/harfbuzz/harfbuzz/issues/2293
This commit is contained in:
parent
53806e5b83
commit
7c241651ac
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue