X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=9f06e174e58524535720d4f956058764630235e6;hp=14121d47af67dd234c5f04134328a9c895654717;hb=4ae5a7b45a430aea5f4b21f9455b4db74ed1c44a;hpb=c83cbe42f3a6c9b145a4557ef874222fe685a9bc diff --git a/src/position.cpp b/src/position.cpp index 14121d47..9f06e174 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -55,13 +55,13 @@ constexpr Piece Pieces[] = { W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING // valuable attacker for the side to move, remove the attacker we just found // from the bitboards and scan for new X-ray attacks behind it. -template +template PieceType min_attacker(const Bitboard* byTypeBB, Square to, Bitboard stmAttackers, Bitboard& occupied, Bitboard& attackers) { Bitboard b = stmAttackers & byTypeBB[Pt]; if (!b) - return min_attacker(byTypeBB, to, stmAttackers, occupied, attackers); + return min_attacker(byTypeBB, to, stmAttackers, occupied, attackers); occupied ^= lsb(b); // Remove the attacker from occupied @@ -77,7 +77,7 @@ PieceType min_attacker(const Bitboard* byTypeBB, Square to, Bitboard stmAttacker // X-ray may add already processed pieces because byTypeBB[] is constant: in // the rook example, now attackers contains _again_ rook in a7, so remove it. attackers &= occupied; - return (PieceType)Pt; + return Pt; } template<>