]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix a warning with MSVC
[stockfish] / src / search.cpp
index c09e23d687a19f34d4b74be3145805fd883bafb1..6b12e3fec1260435b64341d3a186997f890619bf 100644 (file)
@@ -29,6 +29,7 @@
 #include "misc.h"
 #include "movegen.h"
 #include "movepick.h"
+#include "position.h"
 #include "search.h"
 #include "timeman.h"
 #include "thread.h"
@@ -505,7 +506,7 @@ void Thread::search() {
 
               if (   rootMoves.size() == 1
                   || Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 628
-                  || (mainThread->easyMovePlayed = doEasyMove))
+                  || (mainThread->easyMovePlayed = doEasyMove, doEasyMove))
               {
                   // If we are allowed to ponder do not stop the search now but
                   // keep pondering until the GUI sends "ponderhit" or "stop".
@@ -920,8 +921,8 @@ moves_loop: // When in check search starts from here
 
       // Step 13. Pruning at shallow depth
       if (  !rootNode
-         && !inCheck
-         &&  bestValue > VALUE_MATED_IN_MAX_PLY)
+          && !inCheck
+          &&  bestValue > VALUE_MATED_IN_MAX_PLY)
       {
           if (   !captureOrPromotion
               && !givesCheck