Don't need floor() in timeman.cpp
authorMarco Costalba <mcostalba@gmail.com>
Sun, 27 Apr 2014 17:10:00 +0000 (19:10 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 27 Apr 2014 17:10:00 +0000 (19:10 +0200)
For positive numbers result is equivalent:
http://stackoverflow.com/questions/3300290/cast-to-int-vs-floor

Spotted by Joseph Ellis.

No functional change.

src/timeman.cpp

index 2092b72..c305e61 100644 (file)
@@ -63,7 +63,7 @@ namespace {
     double ratio1 = (TMaxRatio * thisMoveImportance) / (TMaxRatio * thisMoveImportance + otherMovesImportance);
     double ratio2 = (thisMoveImportance + TStealRatio * otherMovesImportance) / (thisMoveImportance + otherMovesImportance);
 
-    return int(floor(myTime * std::min(ratio1, ratio2)));
+    return int(myTime * std::min(ratio1, ratio2));
   }
 
 } // namespace