From d84865eac3d7b694b6ad9b6eb95c7a3097b38b3d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 31 Mar 2012 09:16:09 +0100 Subject: [PATCH] Complete the renaming in Search::LimitsType This completes the job started with revision 4124c94583c8f61. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 4 ++-- src/search.h | 2 +- src/timeman.cpp | 6 +++--- src/uci.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 9ebf5c5c..b8ac4ab3 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -290,8 +290,8 @@ void Search::think() { log << "\nSearching: " << pos.to_fen() << "\ninfinite: " << Limits.infinite << " ponder: " << Limits.ponder - << " time: " << Limits.times[pos.side_to_move()] - << " increment: " << Limits.incs[pos.side_to_move()] + << " time: " << Limits.time[pos.side_to_move()] + << " increment: " << Limits.inc[pos.side_to_move()] << " moves to go: " << Limits.movestogo << endl; } diff --git a/src/search.h b/src/search.h index b6f28a73..c573807b 100644 --- a/src/search.h +++ b/src/search.h @@ -80,7 +80,7 @@ struct LimitsType { LimitsType() { memset(this, 0, sizeof(LimitsType)); } bool use_time_management() const { return !(movetime | depth | nodes | infinite); } - int times[2], incs[2], movestogo, depth, nodes, movetime, infinite, ponder; + int time[2], inc[2], movestogo, depth, nodes, movetime, infinite, ponder; }; diff --git a/src/timeman.cpp b/src/timeman.cpp index d545269c..b8f83963 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -111,15 +111,15 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u // Initialize to maximum values but unstablePVExtraTime that is reset unstablePVExtraTime = 0; - optimumSearchTime = maximumSearchTime = limits.times[us]; + optimumSearchTime = maximumSearchTime = limits.time[us]; // 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++) { // Calculate thinking time for hypothetic "moves to go"-value - hypMyTime = limits.times[us] - + limits.incs[us] * (hypMTG - 1) + hypMyTime = limits.time[us] + + limits.inc[us] * (hypMTG - 1) - emergencyBaseTime - emergencyMoveTime * std::min(hypMTG, emergencyMoveHorizon); diff --git a/src/uci.cpp b/src/uci.cpp index fc02cf60..94caada2 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -204,13 +204,13 @@ namespace { while (is >> token) { if (token == "wtime") - is >> limits.times[WHITE]; + is >> limits.time[WHITE]; else if (token == "btime") - is >> limits.times[BLACK]; + is >> limits.time[BLACK]; else if (token == "winc") - is >> limits.incs[WHITE]; + is >> limits.inc[WHITE]; else if (token == "binc") - is >> limits.incs[BLACK]; + is >> limits.inc[BLACK]; else if (token == "movestogo") is >> limits.movestogo; else if (token == "depth") -- 2.39.2