]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Workaround a static data member bug in MSVC
[stockfish] / src / search.cpp
index 2a6ba30b8367e93a6d84869d31b2c7fa5ca01a4f..8279d15780474d598144d5d1a0c16a0804f9e501 100644 (file)
@@ -1147,7 +1147,6 @@ namespace {
     Value value, bestValue = -VALUE_INFINITE;
     Bitboard dcCandidates = mp.discovered_check_candidates();
     Value futilityValue = VALUE_NONE;
-    MovePicker::MovegenPhase moveType;
     bool isCheck = pos.is_check();
     bool useFutilityPruning =   UseFutilityPruning
                              && depth < SelectiveDepth
@@ -1156,14 +1155,14 @@ namespace {
     // Loop through all legal moves until no moves remain or a beta cutoff
     // occurs.
     while (   bestValue < beta
-           && (move = mp.get_next_move(&moveType)) != MOVE_NONE
+           && (move = mp.get_next_move()) != MOVE_NONE
            && !thread_should_stop(threadID))
     {
       assert(move_is_ok(move));
 
       bool singleReply = (isCheck && mp.number_of_moves() == 1);
       bool moveIsCheck = pos.move_is_check(move, dcCandidates);
-      bool moveIsGoodCapture = (moveType == MovePicker::PH_GOOD_CAPTURES);
+      bool moveIsCapture = pos.move_is_capture(move);
       bool moveIsPassedPawnPush = pos.move_is_passed_pawn_push(move);
 
       movesSearched[moveCount++] = ss[ply].currentMove = move;
@@ -1175,7 +1174,7 @@ namespace {
       // Futility pruning
       if (    useFutilityPruning
           &&  ext == Depth(0)
-          && !moveIsGoodCapture
+          && !moveIsCapture
           && !moveIsPassedPawnPush
           && !move_promotion(move))
       {
@@ -1207,7 +1206,7 @@ namespace {
       if (   depth >= 2*OnePly
           && ext == Depth(0)
           && moveCount >= LMRNonPVMoves
-          && !moveIsGoodCapture
+          && !moveIsCapture
           && !move_promotion(move)
           && !moveIsPassedPawnPush
           && !move_is_castle(move)
@@ -2021,6 +2020,7 @@ namespace {
     assert(threat == MOVE_NONE || move_is_ok(threat));
     assert(!move_promotion(m));
     assert(!pos.move_is_check(m));
+    assert(!pos.move_is_capture(m));
     assert(!pos.move_is_passed_pawn_push(m));
     assert(d >= OnePly);
 
@@ -2172,6 +2172,12 @@ namespace {
     {
         lastInfoTime = t;
         lock_grab(&IOLock);
+        if (dbg_show_mean)
+            dbg_print_mean();
+
+        if (dbg_show_hit_rate)
+            dbg_print_hit_rate();
+
         std::cout << "info nodes " << nodes_searched() << " nps " << nps()
                   << " time " << t << " hashfull " << TT.full() << std::endl;
         lock_release(&IOLock);