]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Retire lastMove from Position class
[stockfish] / src / position.cpp
index c121c49734f2eac41f3616af2e5c098c82c93880..83fc6aba3b6949a3c4b6fa7aca27d920813eadfa 100644 (file)
@@ -1425,10 +1425,9 @@ void Position::do_null_move(StateInfo& backupSt) {
 
   // Back up the information necessary to undo the null move to the supplied
   // StateInfo object. In the case of a null move, the only thing we need to
-  // remember is the last move made and the en passant square.
+  // remember is the en passant square.
   // Note that differently from normal case here backupSt is actually used as
   // a backup storage not as a new state to be used.
-  backupSt.lastMove = st->lastMove;
   backupSt.epSquare = st->epSquare;
   backupSt.previous = st->previous;
   st->previous = &backupSt;
@@ -1462,7 +1461,6 @@ void Position::undo_null_move() {
   assert(!is_check());
 
   // Restore information from the our backup StateInfo object
-  st->lastMove = st->previous->lastMove;
   st->epSquare = st->previous->epSquare;
   st->previous = st->previous->previous;