]> git.sesse.net Git - stockfish/commitdiff
Use Key type instead of Bitboard
authorMarco Costalba <mcostalba@gmail.com>
Sat, 29 May 2010 07:11:36 +0000 (08:11 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 29 May 2010 07:11:36 +0000 (08:11 +0100)
They are both 64 bits unsigned integer, but it
is correct to use the proper type.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
src/position.h

index ade1c5d23327470838bb566ebb665e0a0096578b..abfbc9999721d2d6b9ead408c861500db11221fa 100644 (file)
@@ -697,7 +697,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   assert(is_ok());
   assert(move_is_ok(m));
 
   assert(is_ok());
   assert(move_is_ok(m));
 
-  Bitboard key = st->key;
+  Key key = st->key;
 
   // Copy some fields of old state to our new StateInfo object except the
   // ones which are recalculated from scratch anyway, then switch our state
 
   // Copy some fields of old state to our new StateInfo object except the
   // ones which are recalculated from scratch anyway, then switch our state
@@ -896,7 +896,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
 /// Position::do_capture_move() is a private method used to update captured
 /// piece info. It is called from the main Position::do_move function.
 
 /// Position::do_capture_move() is a private method used to update captured
 /// piece info. It is called from the main Position::do_move function.
 
-void Position::do_capture_move(Bitboard& key, PieceType capture, Color them, Square to, bool ep) {
+void Position::do_capture_move(Key& key, PieceType capture, Color them, Square to, bool ep) {
 
     assert(capture != KING);
 
 
     assert(capture != KING);
 
index 234da26dbf72fa2d63f39ac66b9a10f8002e6c67..67cca4bba5d2c96e4bc1f7a12839e895c4fc0fbd 100644 (file)
@@ -290,7 +290,7 @@ private:
   void allow_ooo(Color c);
 
   // Helper functions for doing and undoing moves
   void allow_ooo(Color c);
 
   // Helper functions for doing and undoing moves
-  void do_capture_move(Bitboard& key, PieceType capture, Color them, Square to, bool ep);
+  void do_capture_move(Key& key, PieceType capture, Color them, Square to, bool ep);
   void do_castle_move(Move m);
   void undo_castle_move(Move m);
   void find_checkers();
   void do_castle_move(Move m);
   void undo_castle_move(Move m);
   void find_checkers();