]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Change move_is_ok() and square_is_ok() in something useful
[stockfish] / src / movepick.cpp
index 2e8eb665b9acd04573c9e438d77212f2888ccff6..dd4743703f6ec9fae93f71c9e0c2d40fd17559a2 100644 (file)
@@ -99,7 +99,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
 
       phasePtr = MainSearchPhaseTable;
   }
-  else if (d == DEPTH_ZERO)
+  else if (d >= DEPTH_QS_CHECKS)
       phasePtr = QsearchWithChecksPhaseTable;
   else
   {
@@ -313,7 +313,7 @@ Move MovePicker::get_next_move() {
 
               // Sort negative scored moves only when we get there
               if (curMove == lastGoodNonCapture)
-                  insertion_sort(lastGoodNonCapture, lastMove);
+                  insertion_sort<MoveStack>(lastGoodNonCapture, lastMove);
 
               move = (curMove++)->move;
               if (   move != ttMoves[0].move