From 678b9d8c9294ac12484a7495e075ef6b8e5a47b8 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 19 Dec 2023 10:46:00 +0100 Subject: [PATCH] Fix -Wpessimizing-move --- .../boost/multiprecision/detail/min_max.hpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/multiprecision/detail/min_max.hpp b/include/boost/multiprecision/detail/min_max.hpp index 8a78c612b..835ed8a61 100644 --- a/include/boost/multiprecision/detail/min_max.hpp +++ b/include/boost/multiprecision/detail/min_max.hpp @@ -36,14 +36,14 @@ inline typename std::enable_if t(b); if (a < t) return a; - return std::move(t); + return t; } template inline typename std::enable_if::value, const number >::type(min)(const detail::expression& a, const number& b) { number t(a); if (t < b) - return std::move(t); + return t; return b; } template @@ -51,16 +51,16 @@ inline typename detail::expression::result_type(min)(const { typename detail::expression::result_type t1(a), t2(b); if (t1 < t2) - return std::move(t1); - return std::move(t2); + return t1; + return t2; } template inline typename detail::expression::result_type(min)(const detail::expression& a, const detail::expression& b) { typename detail::expression::result_type t1(a), t2(b); if (t1 < t2) - return std::move(t1); - return std::move(t2); + return t1; + return t2; } template @@ -74,14 +74,14 @@ inline typename std::enable_if t(b); if (a > t) return a; - return std::move(t); + return t; } template inline typename std::enable_if::value, const number >::type(max)(const detail::expression& a, const number& b) { number t(a); if (t > b) - return std::move(t); + return t; return b; } template @@ -89,16 +89,16 @@ inline typename detail::expression::result_type(max)(const { typename detail::expression::result_type t1(a), t2(b); if (t1 > t2) - return std::move(t1); - return std::move(t2); + return t1; + return t2; } template inline typename detail::expression::result_type(max)(const detail::expression& a, const detail::expression& b) { typename detail::expression::result_type t1(a), t2(b); if (t1 > t2) - return std::move(t1); - return std::move(t2); + return t1; + return t2; } }} // namespace boost::multiprecision