X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=03c00148a084636fbeac4370f55635890ec0c46f;hp=74173d03bc9004f75243177a45def93a57b81ade;hb=82ad9ce9cfb0eff33f1d781f329f7c5dc0b277eb;hpb=3c576efa77f431cf3687881b8fd6a728e87ed97d diff --git a/src/position.h b/src/position.h index 74173d03..03c00148 100644 --- a/src/position.h +++ b/src/position.h @@ -310,7 +310,7 @@ inline Bitboard Position::check_squares(PieceType pt) const { } inline bool Position::pawn_passed(Color c, Square s) const { - return !(pieces(~c, PAWN) & passed_pawn_mask(c, s)); + return !(pieces(~c, PAWN) & passed_pawn_span(c, s)); } inline bool Position::advanced_pawn_push(Move m) const { @@ -413,7 +413,7 @@ inline void Position::move_piece(Piece pc, Square from, Square to) { // index[from] is not updated and becomes stale. This works as long as index[] // is accessed just by known occupied squares. - Bitboard fromTo = SquareBB[from] ^ SquareBB[to]; + Bitboard fromTo = square_bb(from) | square_bb(to); byTypeBB[ALL_PIECES] ^= fromTo; byTypeBB[type_of(pc)] ^= fromTo; byColorBB[color_of(pc)] ^= fromTo;