]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix build with MSVC 2013
[stockfish] / src / search.cpp
index 23629e6db9c0ebbdbf1d48a25081b485367ba76b..5ea1f561ed98a9c6bfd452aeaef69c02e64e9fa4 100644 (file)
@@ -367,6 +367,12 @@ namespace {
                 if (Signals.stop)
                     return;
 
                 if (Signals.stop)
                     return;
 
+                // When failing high/low give some update (without cluttering
+                // the UI) before to research.
+                if (  (bestValue <= alpha || bestValue >= beta)
+                    && Time::now() - SearchTime > 3000)
+                    sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl;
+
                 // In case of failing low/high increase aspiration window and
                 // research, otherwise exit the loop.
                 if (bestValue <= alpha)
                 // In case of failing low/high increase aspiration window and
                 // research, otherwise exit the loop.
                 if (bestValue <= alpha)
@@ -385,10 +391,6 @@ namespace {
                 delta += delta / 2;
 
                 assert(alpha >= -VALUE_INFINITE && beta <= VALUE_INFINITE);
                 delta += delta / 2;
 
                 assert(alpha >= -VALUE_INFINITE && beta <= VALUE_INFINITE);
-
-                // Give some update (without cluttering the UI) before to research
-                if (Time::now() - SearchTime > 3000)
-                    sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl;
             }
 
             // Sort the PV lines searched so far and update the GUI
             }
 
             // Sort the PV lines searched so far and update the GUI
@@ -1667,6 +1669,7 @@ void Thread::idle_loop() {
           Threads.mutex.lock();
 
           assert(searching);
           Threads.mutex.lock();
 
           assert(searching);
+          assert(activeSplitPoint);
           SplitPoint* sp = activeSplitPoint;
 
           Threads.mutex.unlock();
           SplitPoint* sp = activeSplitPoint;
 
           Threads.mutex.unlock();