X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=63f668b9b8a7307243c1146d55e079c1a713e5d7;hp=38870a2be69fbd8a33ca8a50e610db4a29dd7c86;hb=2c237da54647bb7526f3512bea183eb44919cdda;hpb=b73016bb41d4c2fad3126b2e0018d71a36e78331;ds=sidebyside diff --git a/src/bitboard.h b/src/bitboard.h index 38870a2b..63f668b9 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -186,7 +186,7 @@ inline Bitboard forward_bb(Color c, Square s) { /// pawn_attack_span() returns a bitboard representing all the squares that can be /// attacked by a pawn of the given color when it moves along its file, starting /// from the given square: -/// PawnAttackSpan[c][s] = in_front_bb(c, rank_of(s)) & adjacent_files_bb(s); +/// PawnAttackSpan[c][s] = in_front_bb(c, rank_of(s)) & adjacent_files_bb(file_of(s)); inline Bitboard pawn_attack_span(Color c, Square s) { return PawnAttackSpan[c][s]; @@ -251,7 +251,7 @@ inline Bitboard attacks_bb(PieceType pt, Square s, Bitboard occupied) { switch (pt) { case BISHOP: return attacks_bb(s, occupied); - case ROOK : return attacks_bb(s, occupied); + case ROOK : return attacks_bb< ROOK>(s, occupied); case QUEEN : return attacks_bb(s, occupied) | attacks_bb(s, occupied); default : return PseudoAttacks[pt][s]; }