From: Fabian Fichter Date: Thu, 31 Jan 2019 22:13:20 +0000 (+0100) Subject: Small speed-up in check detection X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cf5b42efe3c0b9eae2b1aa9568299e214f8ba2d9;p=fairystockfish.git Small speed-up in check detection Since pieces can not give check against own king. No functional change. --- diff --git a/src/position.cpp b/src/position.cpp index 2b1863b..2b52675 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1233,7 +1233,7 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) { st->key = k; // Calculate checkers bitboard (if move gives check) - st->checkersBB = givesCheck ? attackers_to(square(them)) & pieces(us) : 0; + st->checkersBB = givesCheck ? attackers_to(square(them), us) & pieces(us) : 0; // Update information about promoted pieces if (type_of(m) != DROP && is_promoted(from))