[Scummvm-cvs-logs] scummvm master -> 7d7c0966a2836e9447befa6c31cbd114b9f40ef5

bluegr bluegr at gmail.com
Thu Oct 17 00:15:08 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7d7c0966a2 FULLPIPE: Fix compilation with MSVC


Commit: 7d7c0966a2836e9447befa6c31cbd114b9f40ef5
    https://github.com/scummvm/scummvm/commit/7d7c0966a2836e9447befa6c31cbd114b9f40ef5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-16T15:09:37-07:00

Commit Message:
FULLPIPE: Fix compilation with MSVC

MSVC complains that this specific usage of sqrt() is ambiguous, since
the arguments aren't float or double

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index aced36f..0c0db32 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -724,7 +724,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
 		movInfo1.pt2.y = ypos;
 
 		MovGraphNode *nod = linkInfoDest.link->_movGraphNode1;
-		double dst1 = sqrt((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x));
+		double dst1 = sqrt((double)((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x)));
 		int dst = linkInfoDest.link->_movGraphNode2->_distance - nod->_distance;
 
 		movInfo1.distance2 = nod->_distance + (dst1 * (double)dst / linkInfoDest.link->_distance);






More information about the Scummvm-git-logs mailing list