mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Accessor for SquareBB #2067
This is a non-functional code style change. If we add an accessor function for SquareBB we can consolidate all of the asserts. This is also a bit cleaner because all SquareBB accesses go through this method making future changes easier to manage. STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 63406 W: 14084 L: 14045 D: 35277 http://tests.stockfishchess.org/tests/view/5c9ea6100ebc5925cfffc9af No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
7133598a98
commit
796d0ad70e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user