[Orxonox-commit 5297] r9960 - code/trunk/src/libraries/util
landauf at orxonox.net
landauf at orxonox.net
Fri Jan 3 20:57:14 CET 2014
Author: landauf
Date: 2014-01-03 20:57:13 +0100 (Fri, 03 Jan 2014)
New Revision: 9960
Modified:
code/trunk/src/libraries/util/Math.cc
Log:
fixed warning (msvc): the cast affected only '50' and not the whole expression. added braces and used a static_cast
Modified: code/trunk/src/libraries/util/Math.cc
===================================================================
--- code/trunk/src/libraries/util/Math.cc 2014-01-03 19:49:30 UTC (rev 9959)
+++ code/trunk/src/libraries/util/Math.cc 2014-01-03 19:57:13 UTC (rev 9960)
@@ -284,7 +284,7 @@
// perform a coordinate transformation to get distance in relation of the position of the ship
orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
- return (int) 50 - 100*distanceShip.x;
+ return static_cast<int>(50 - 100*distanceShip.x);
}
More information about the Orxonox-commit
mailing list