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
This commit is contained in:
FauziAkram
2026-04-09 21:53:08 +02:00
committed by Disservin
parent 20b61d2fd4
commit ef27b4db7b
+1 -2
View File
@@ -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<NORTH>(pos.pieces(us, PAWN))
: shift<SOUTH>(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