X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimeman.cpp;h=34dbcc6eb13598b0fdf57d4e37f6bdd7dba6c29b;hb=7f142d68179919a507204e7980fff4f79648dbbc;hp=bdcaee84c5f4ce10bc75198993ed6c6d315d0d30;hpb=e6482b7d97a6620cebdd569cce575d42ed80c871;p=stockfish diff --git a/src/timeman.cpp b/src/timeman.cpp index bdcaee84..34dbcc6e 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -17,8 +17,8 @@ along with this program. If not, see . */ -#include #include +#include #include "search.h" #include "timeman.h" @@ -114,7 +114,7 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u // We calculate optimum time usage for different hypothetic "moves to go"-values and choose the // minimum of calculated search time values. Usually the greatest hypMTG gives the minimum values. - for (hypMTG = 1; hypMTG <= (limits.movestogo ? std::min(limits.movestogo, MoveHorizon) : MoveHorizon); hypMTG++) + for (hypMTG = 1; hypMTG <= (limits.movestogo ? std::min(limits.movestogo, MoveHorizon) : MoveHorizon); ++hypMTG) { // Calculate thinking time for hypothetic "moves to go"-value hypMyTime = limits.time[us] @@ -150,7 +150,7 @@ namespace { int thisMoveImportance = move_importance(currentPly) * slowMover / 100; int otherMovesImportance = 0; - for (int i = 1; i < movesToGo; i++) + for (int i = 1; i < movesToGo; ++i) otherMovesImportance += move_importance(currentPly + 2 * i); float ratio1 = (TMaxRatio * thisMoveImportance) / float(TMaxRatio * thisMoveImportance + otherMovesImportance);