From 9bda97975aeec2c18198946e72524f13b4308d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 19 Jul 2016 12:14:55 +0200 Subject: [PATCH] Fixed #7037 (32bit (-m32): testsuite fails) --- lib/checkcondition.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/lib/checkcondition.cpp b/lib/checkcondition.cpp index c6a8d590b..d3a3c9c93 100644 --- a/lib/checkcondition.cpp +++ b/lib/checkcondition.cpp @@ -568,32 +568,16 @@ static inline T getvalue(const int test, const T value1, const T value2) // 4 => return value2 // 5 => return value that is larger than both value1 and value2 switch (test) { - case 1: { - const T ret = std::min(value1, value2); - if ((ret - (T)1) < ret) - return ret - (T)1; - else if ((ret / (T)2) < ret) - return ret / (T)2; - else if ((ret * (T)2) < ret) - return ret * (T)2; - return ret; - } + case 1: + return std::numeric_limits::lowest(); case 2: return value1; case 3: return getvalue3(value1, value2); case 4: return value2; - case 5: { - const T ret = std::max(value1, value2); - if ((ret + (T)1) > ret) - return ret + (T)1; - else if ((ret / (T)2) > ret) - return ret / (T)2; - else if ((ret * (T)2) > ret) - return ret * (T)2; - return ret; - } + case 5: + return std::numeric_limits::max(); }; return 0; }