]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Make Square and Bitboard operators commutative
[stockfish] / src / position.h
index e6c901ea2c98793e68ae7a17927a12fdefa65af5..2ec2729cf3a256efcdeaa53a2fc0ca5a725a20ee 100644 (file)
@@ -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.
-  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;