]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
GameTick: add cmath include and _USE_MATH_DEFINES
[lugaru.git] / Source / GameTick.cpp
index b216545a8f4dcd732d770c75449f2a32458132f0..84a10da74e0b582f6e37e6ab0099912895165dbd 100644 (file)
@@ -19,6 +19,9 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
+// Enable full math definitions
+#define _USE_MATH_DEFINES
+
 #if PLATFORM_UNIX
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -27,8 +30,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <direct.h>
 #endif
 
+
 #include <limits>
 #include <ctime>
+#include <cmath>
 #include <dirent.h>
 #include "Game.h"
 #include "openal_wrapper.h"
@@ -200,7 +205,7 @@ public:
         is >> mapname;
         is.ignore(256, ':');
         is >> description;
-        for (unsigned pos = description.find('_'); pos != string::npos; pos = description.find('_', pos)) {
+        for (size_t pos = description.find('_'); pos != string::npos; pos = description.find('_', pos)) {
             description.replace(pos, 1, 1, ' ');
         }
         is.ignore(256, ':');