From ef3770e6d9a8bc0d465660ca87f8611a25d98d22 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Thu, 5 May 2011 08:03:41 +0400 Subject: [PATCH] Obtain float max value from std::numeric_limits --- Source/GameTick.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index b30d4f1..58a3bde 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif +#include #include #include "Game.h" #include "openal_wrapper.h" @@ -431,7 +432,7 @@ static void ch_size(Game *game, const char *args) static int find_closest() { int closest = 0; - float closestdist = 1.0/0.0; + float closestdist = std::numeric_limits::max(); for (int i = 1; i < numplayers; i++) { float distance; -- 2.39.2