From ef27b4db7b842f230282b35dd15547f870365c7e Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Thu, 9 Apr 2026 21:43:18 +0200 Subject: [PATCH] Using the already existing pawn_single_push_bb Using the already existing pawn_single_push_bb helper which encapsulates the exact same logic. closes https://github.com/official-stockfish/Stockfish/pull/6700 No functional change --- src/search.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index ddae81dfb..47dc777a6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1728,8 +1728,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta) if (!ss->inCheck && !moveCount && !pos.non_pawn_material(us) && type_of(pos.captured_piece()) >= ROOK) { - if (!((us == WHITE ? shift(pos.pieces(us, PAWN)) - : shift(pos.pieces(us, PAWN))) + if (!(pawn_single_push_bb(us, pos.pieces(us, PAWN)) & ~pos.pieces())) // no pawn pushes available { pos.state()->checkersBB = Rank1BB; // search for legal king-moves only