]> git.sesse.net Git - stockfish/commitdiff
Fix a warning with MSVC
authorMarco Costalba <mcostalba@gmail.com>
Thu, 31 Aug 2017 07:01:20 +0000 (09:01 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 1 Sep 2017 18:23:31 +0000 (20:23 +0200)
warning C4244: '*=': conversion from 'double' to 'int', possible loss of data

No functional change.

src/timeman.cpp

index 330709be6985d84be15be778dfc8746eccd0741a..2612fb52fa88762474170f182a1ef98846180b04 100644 (file)
@@ -64,7 +64,7 @@ namespace {
     int time = int(std::min(1.0, ratio) * std::max(0, myTime - moveOverhead));
 
     if (type == OptimumTime && ponder)
     int time = int(std::min(1.0, ratio) * std::max(0, myTime - moveOverhead));
 
     if (type == OptimumTime && ponder)
-        time *= 1.25;
+        time = 5 * time / 4;
 
     return time;
   }
 
     return time;
   }