mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
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:
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user