Fixes compilation of abs for C++11.
This commit is contained in:
parent
af98cf1781
commit
bc2e59082b
3 changed files with 5 additions and 5 deletions
|
@ -434,7 +434,7 @@ tidiv<T, 8>::idiv(tfloat<T, 8>& lhs, tfloat<T, 8> rhs)
|
|||
* value is also quite likely to happen, so the case is optimized.
|
||||
*/
|
||||
|
||||
Uint32 lhs_value = abs(lhs.value_);
|
||||
Uint32 lhs_value = std::abs(lhs.value_);
|
||||
if(LIKELY(lhs_value <= 0x007FFFFFu)) {
|
||||
FLOATING_POINT_EMULATION_TRACER_COUNT("lhs_value <= 0x007FFFFFu");
|
||||
sal(lhs.value_, 8);
|
||||
|
@ -508,7 +508,7 @@ tidiv<T, 8>::idiv(tfloat<T, 8>& lhs, tfloat<T, 8> rhs)
|
|||
* number of positions.
|
||||
*/
|
||||
|
||||
Uint32 rhs_value = abs(rhs.value_);
|
||||
Uint32 rhs_value = std::abs(rhs.value_);
|
||||
|
||||
/*
|
||||
* Will contain the offset from bit 0 of the LSB set. Since we're only
|
||||
|
|
|
@ -1665,8 +1665,8 @@ surface rotate_any_surface(const surface& surf, float angle, int zoom, int offse
|
|||
min_y = std::min(0.0F, std::min(point_1y, std::min(point_2y, point_3y)));
|
||||
max_x = (angle > 90 && angle < 180) ? 0 : std::max(point_1x, std::max(point_2x, point_3x));
|
||||
max_y = (angle > 180 && angle < 270) ? 0 : std::max(point_1y, std::max(point_2y, point_3y));
|
||||
dst_w = static_cast<int>(ceil(abs(max_x) - min_x)) / zoom;
|
||||
dst_h = static_cast<int>(ceil(abs(max_y) - min_y)) / zoom;
|
||||
dst_w = static_cast<int>(ceil(std::abs(max_x) - min_x)) / zoom;
|
||||
dst_h = static_cast<int>(ceil(std::abs(max_y) - min_y)) / zoom;
|
||||
}
|
||||
surface dst(create_neutral_surface(dst_w, dst_h));
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ BOOST_AUTO_TEST_CASE ( test_config_attribute_value )
|
|||
x_int = c["x"].to_int();
|
||||
BOOST_CHECK_EQUAL(x_int, 1);
|
||||
x_dbl = c["x"].to_long_long();
|
||||
BOOST_CHECK(abs(x_dbl - 1.499) < 1e-6);
|
||||
BOOST_CHECK(std::abs(x_dbl - 1.499) < 1e-6);
|
||||
|
||||
|
||||
c["x"] = 123456789123ll;
|
||||
|
|
Loading…
Add table
Reference in a new issue