From 67a4cb7d8a4461fe7d5206189fd4e9539beb20b7 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Tue, 3 Apr 2018 18:16:17 +0200 Subject: Fix various clang-tidy reported performance-type-promotion-in-math-fn --- src/collision.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/collision.cpp') diff --git a/src/collision.cpp b/src/collision.cpp index 24d22e825..e966ad19d 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "collision.h" +#include #include "mapblock.h" #include "map.h" #include "nodedef.h" @@ -564,7 +565,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, box.MinEdge += *pos_f; box.MaxEdge += *pos_f; } - if (fabs(cbox.MaxEdge.Y - box.MinEdge.Y) < 0.15f * BS) { + if (std::fabs(cbox.MaxEdge.Y - box.MinEdge.Y) < 0.15f * BS) { result.touching_ground = true; if (box_info.is_object) -- cgit v1.2.3