mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
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:
committed by
Disservin
parent
e0e6fdf094
commit
955c927265
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user