Fixed #7037 (32bit (-m32): testsuite fails)
This commit is contained in:
parent
ca929f0f1b
commit
9bda97975a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue