Fixes compilation of abs for C++11.

This commit is contained in:
Mark de Wever 2014-05-31 18:34:52 +02:00 committed by Ignacio R. Morelle
parent 25ea48379a
commit 88536b42de
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -1652,8 +1652,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));
{