From cbe0a34f0b54a3362f78fb105541e5eb74c33797 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 30 Jul 2016 10:15:13 +0300 Subject: [PATCH] Fixed usages of abs() function with double arguments Clang no longer issues "warning: using integer absolute value function 'abs' when argument is of floating point type" --- src/p_map.cpp | 2 +- src/r_things.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 106c931527..110ae5235f 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1566,7 +1566,7 @@ bool P_CheckPosition(AActor *thing, const DVector2 &pos, FCheckPosition &tm, boo tm.floorpic = *rover->top.texture; tm.floorterrain = rover->model->GetTerrain(rover->top.isceiling); } - if (ff_bottom < tm.ceilingz && abs(delta1) >= abs(delta2)) + if (ff_bottom < tm.ceilingz && fabs(delta1) >= fabs(delta2)) { tm.ceilingz = ff_bottom; tm.ceilingpic = *rover->bottom.texture; diff --git a/src/r_things.cpp b/src/r_things.cpp index 248e50c186..aad8fb501e 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -916,7 +916,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor // too far off the side? // if it's a voxel, it can be further off the side if ((voxel == NULL && (fabs(tx / 64) > fabs(tz))) || - (voxel != NULL && (fabs(tx / 128) > abs(tz)))) + (voxel != NULL && (fabs(tx / 128) > fabs(tz)))) { return; }