]> git.sesse.net Git - stockfish/commitdiff
Complete the renaming in Search::LimitsType
authorMarco Costalba <mcostalba@gmail.com>
Sat, 31 Mar 2012 08:16:09 +0000 (09:16 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 31 Mar 2012 08:16:09 +0000 (09:16 +0100)
This completes the job started with revision
4124c94583c8f61.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp
src/search.h
src/timeman.cpp
src/uci.cpp

index 9ebf5c5ca25fbcd811cbe09f0bcf66dd70e8c01a..b8ac4ab3cd2940e13d3890effdddc69e4f0e4a45 100644 (file)
@@ -290,8 +290,8 @@ void Search::think() {
       log << "\nSearching: "  << pos.to_fen()
           << "\ninfinite: "   << Limits.infinite
           << " ponder: "      << Limits.ponder
       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;
   }
           << " moves to go: " << Limits.movestogo
           << endl;
   }
index b6f28a73aa945d8091106f7d21a324e0c1d083e3..c573807b41bd01c1d9c28cf79464b94570e317da 100644 (file)
@@ -80,7 +80,7 @@ struct LimitsType {
   LimitsType() { memset(this, 0, sizeof(LimitsType)); }
   bool use_time_management() const { return !(movetime | depth | nodes | infinite); }
 
   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;
 };
 
 
 };
 
 
index d545269ca31a963a39df29fef6614f707e720a59..b8f839637ce2ef868a2d409e62c93faaddbfa5dd 100644 (file)
@@ -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;
 
   // 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
 
   // 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);
 
                  - emergencyBaseTime
                  - emergencyMoveTime * std::min(hypMTG, emergencyMoveHorizon);
 
index fc02cf60f69a20eec8cbb034b438865b9ab6d5f0..94caada2bde67c97b1d2159d64298146a9a17065 100644 (file)
@@ -204,13 +204,13 @@ namespace {
     while (is >> token)
     {
         if (token == "wtime")
     while (is >> token)
     {
         if (token == "wtime")
-            is >> limits.times[WHITE];
+            is >> limits.time[WHITE];
         else if (token == "btime")
         else if (token == "btime")
-            is >> limits.times[BLACK];
+            is >> limits.time[BLACK];
         else if (token == "winc")
         else if (token == "winc")
-            is >> limits.incs[WHITE];
+            is >> limits.inc[WHITE];
         else if (token == "binc")
         else if (token == "binc")
-            is >> limits.incs[BLACK];
+            is >> limits.inc[BLACK];
         else if (token == "movestogo")
             is >> limits.movestogo;
         else if (token == "depth")
         else if (token == "movestogo")
             is >> limits.movestogo;
         else if (token == "depth")