mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
Retire lastMove from Position class
Is not used in any way so remove. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user