Merge official-stockfish/master
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 3 Sep 2020 21:49:43 +0000 (23:49 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 3 Sep 2020 21:49:43 +0000 (23:49 +0200)
No functional change.

1  2 
src/bitboard.h
src/evaluate.cpp

diff --cc src/bitboard.h
Simple merge
@@@ -304,13 -273,10 +304,13 @@@ namespace 
          // Find attacked squares, including x-ray attacks for bishops and rooks
          b = Pt == BISHOP ? attacks_bb<BISHOP>(s, pos.pieces() ^ pos.pieces(QUEEN))
            : Pt ==   ROOK ? attacks_bb<  ROOK>(s, pos.pieces() ^ pos.pieces(QUEEN) ^ pos.pieces(Us, ROOK))
 -                         : attacks_bb<Pt>(s, pos.pieces());
 +                         : pos.attacks_from(Us, Pt, s);
 +
 +        // Restrict mobility to actual squares of board
 +        b &= pos.board_bb(Us, Pt);
  
          if (pos.blockers_for_king(Us) & s)
-             b &= LineBB[pos.square<KING>(Us)][s];
+             b &= line_bb(pos.square<KING>(Us), s);
  
          attackedBy2[Us] |= attackedBy[Us][ALL_PIECES] & b;
          attackedBy[Us][Pt] |= b;