]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Better interface to get the current move type
[stockfish] / src / search.cpp
index 2a6ba30b8367e93a6d84869d31b2c7fa5ca01a4f..bb6ba9ac5ee84bebbf2aba40f18bff3766d2ae12 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 moveIsGoodCapture = (mp.current_move_type() == MovePicker::PH_GOOD_CAPTURES);
       bool moveIsPassedPawnPush = pos.move_is_passed_pawn_push(move);
 
       movesSearched[moveCount++] = ss[ply].currentMove = move;