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
|
// 4 => return value2
|
||||||
// 5 => return value that is larger than both value1 and value2
|
// 5 => return value that is larger than both value1 and value2
|
||||||
switch (test) {
|
switch (test) {
|
||||||
case 1: {
|
case 1:
|
||||||
const T ret = std::min(value1, value2);
|
return std::numeric_limits<T>::lowest();
|
||||||
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 2:
|
case 2:
|
||||||
return value1;
|
return value1;
|
||||||
case 3:
|
case 3:
|
||||||
return getvalue3<T>(value1, value2);
|
return getvalue3<T>(value1, value2);
|
||||||
case 4:
|
case 4:
|
||||||
return value2;
|
return value2;
|
||||||
case 5: {
|
case 5:
|
||||||
const T ret = std::max(value1, value2);
|
return std::numeric_limits<T>::max();
|
||||||
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;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue