Removed redundant board updates

Contrary to what the comment says, `remove_piece` does in fact set the
relevant `board` elements to `NO_PIECE`.

closes https://github.com/official-stockfish/Stockfish/pull/6471

No functional change
This commit is contained in:
Pieter te Brake
2025-12-21 15:43:32 +01:00
committed by Disservin
parent e0e6fdf094
commit 955c927265
-2
View File
@@ -1225,8 +1225,6 @@ void Position::do_castling(Color us,
// Remove both pieces first since squares could overlap in Chess960
remove_piece(Do ? from : to, dts);
remove_piece(Do ? rfrom : rto, dts);
board[Do ? from : to] = board[Do ? rfrom : rto] =
NO_PIECE; // remove_piece does not do this for us
put_piece(make_piece(us, KING), Do ? to : from, dts);
put_piece(make_piece(us, ROOK), Do ? rto : rfrom, dts);
}