]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Do not copy the whole old state in do_move()
[stockfish] / src / position.h
index 981bad3e846f31cb8459efd82f5884ba5d17aa62..ae750697aa894b423fa52e15f5fb4a7d8f93f0eb 100644 (file)
@@ -83,10 +83,10 @@ struct StateInfo {
   Key key, pawnKey, materialKey;
   int castleRights, rule50;
   Square epSquare;
-  Move lastMove;
   Value mgValue, egValue;
   PieceType capture;
   StateInfo* previous;
+  Move lastMove;
 };
 
 
@@ -294,6 +294,7 @@ private:
   void allow_ooo(Color c);
 
   // Helper functions for doing and undoing moves
+  void init_new_state(StateInfo& newSt);
   void do_capture_move(Move m, PieceType capture, Color them, Square to);
   void do_castle_move(Move m);
   void do_promotion_move(Move m);