Group time management globals initialization
authorMarco Costalba <mcostalba@gmail.com>
Tue, 9 Mar 2010 13:25:07 +0000 (14:25 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 13 Mar 2010 09:59:03 +0000 (10:59 +0100)
Instead to leave uninitialized or scattered in the code
as is the case for ExtraSearchTime.

No functional change.

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

index 3eba90d9678b8cd843688f5e00b3648731726fc8..b8cf5b908df2ba1780321588be3d0235ec40f2f3 100644 (file)
@@ -373,6 +373,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
 
   // Initialize global search variables
   StopOnPonderhit = AbortSearch = Quit = AspirationFailLow = false;
 
   // Initialize global search variables
   StopOnPonderhit = AbortSearch = Quit = AspirationFailLow = false;
+  MaxSearchTime = AbsoluteMaxSearchTime = ExtraSearchTime = 0;
   NodesSincePoll = 0;
   TM.resetNodeCounters();
   SearchStartTime = get_system_time();
   NodesSincePoll = 0;
   TM.resetNodeCounters();
   SearchStartTime = get_system_time();
@@ -647,8 +648,6 @@ namespace {
         // Initialize iteration
         Iteration++;
         BestMoveChangesByIteration[Iteration] = 0;
         // Initialize iteration
         Iteration++;
         BestMoveChangesByIteration[Iteration] = 0;
-        if (Iteration <= 5)
-            ExtraSearchTime = 0;
 
         cout << "info depth " << Iteration << endl;
 
 
         cout << "info depth " << Iteration << endl;