projects
/
stockfish
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make Square and Bitboard operators commutative
[stockfish]
/
src
/
position.h
diff --git
a/src/position.h
b/src/position.h
index e6c901ea2c98793e68ae7a17927a12fdefa65af5..2ec2729cf3a256efcdeaa53a2fc0ca5a725a20ee 100644
(file)
--- a/
src/position.h
+++ b/
src/position.h
@@
-430,7
+430,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.
// index[from] is not updated and becomes stale. This works as long as index[]
// is accessed just by known occupied squares.
- Bitboard fromTo =
square_bb(from) | square_bb(to)
;
+ Bitboard fromTo =
from | to
;
byTypeBB[ALL_PIECES] ^= fromTo;
byTypeBB[type_of(pc)] ^= fromTo;
byColorBB[color_of(pc)] ^= fromTo;
byTypeBB[ALL_PIECES] ^= fromTo;
byTypeBB[type_of(pc)] ^= fromTo;
byColorBB[color_of(pc)] ^= fromTo;