Fixed #7037 (32bit (-m32): testsuite fails)

This commit is contained in:
Daniel Marjamäki 2016-07-19 12:14:55 +02:00
parent ca929f0f1b
commit 9bda97975a
1 changed files with 4 additions and 20 deletions

View File

@ -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<T>::lowest();
case 2:
return value1;
case 3:
return getvalue3<T>(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<T>::max();
};
return 0;
}