From 3630c588c65e55d83f11c46980d6df500d18d2c4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 2 Jun 2014 01:00:14 +0200 Subject: BBVS: Silence double->float conversion warning. This might not be obvious to a C++ developer, but we use C's sin which is *always* double. Thus, sin will return a double and therefore some compilers might warn about this conversion. --- engines/bbvs/walk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/bbvs/walk.cpp b/engines/bbvs/walk.cpp index 4d71d95fc0..f3023b97c2 100644 --- a/engines/bbvs/walk.cpp +++ b/engines/bbvs/walk.cpp @@ -109,7 +109,7 @@ void BbvsEngine::updateWalkObject(SceneObject *sceneObject) { void BbvsEngine::walkObject(SceneObject *sceneObject, const Common::Point &destPt, int walkSpeed) { int deltaX = destPt.x - (sceneObject->x >> 16); int deltaY = destPt.y - (sceneObject->y >> 16); - float distance = sqrt((double)(deltaX * deltaX + deltaY * deltaY)); + float distance = (float)sqrt((double)(deltaX * deltaX + deltaY * deltaY)); // NOTE The original doesn't have this check but without it the whole pathfinding breaks if (distance > 0.0) { sceneObject->walkCount = (int)(distance / ((((float)ABS(deltaX) / distance) + 1.0) * ((float)walkSpeed / 120))); -- cgit v1.2.3