]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Use update_checkers<>() also for PAWN
[stockfish] / src / position.h
index d05546f75ff7d6cae1157d92be10ae79b86eb37c..3822e3bc5f225ee276724c9e3347b4e5fb772f19 100644 (file)
@@ -532,6 +532,11 @@ inline Bitboard Position::pawn_attacks(Color c, Square s) const {
   return StepAttackBB[pawn_of_color(c)][s];
 }
 
+template<>
+inline Bitboard Position::piece_attacks<PAWN>(Square s) const {
+  return StepAttackBB[pawn_of_color(opposite_color(sideToMove))][s];
+}
+
 template<>
 inline Bitboard Position::piece_attacks<KNIGHT>(Square s) const {
   return StepAttackBB[KNIGHT][s];