X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmovegen.cpp;h=2f7c55c8640bda0f93923c5b480241ac84471386;hb=82ff04b992a53c757519a6ff61576ebd267c0cee;hp=5ed248933ce132b6ad820b6dc0ed0fb466266bfd;hpb=3c576efa77f431cf3687881b8fd6a728e87ed97d;p=stockfish diff --git a/src/movegen.cpp b/src/movegen.cpp index 5ed24893..2f7c55c8 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -93,10 +93,10 @@ namespace { // if the pawn is not on the same file as the enemy king, because we // don't generate captures. Note that a possible discovery check // promotion has been already generated amongst the captures. - Bitboard dcCandidates = pos.blockers_for_king(Them); - if (pawnsNotOn7 & dcCandidates) + Bitboard dcCandidateQuiets = pos.blockers_for_king(Them) & pawnsNotOn7; + if (dcCandidateQuiets) { - Bitboard dc1 = shift(pawnsNotOn7 & dcCandidates) & emptySquares & ~file_bb(ksq); + Bitboard dc1 = shift(dcCandidateQuiets) & emptySquares & ~file_bb(ksq); Bitboard dc2 = shift(dc1 & TRank3BB) & emptySquares; b1 |= dc1;