X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=3f81994611975aaaf31c8f397b1613cf85edb297;hp=b3e86c853f0a90ebb58fb565d2785e5ed30711b6;hb=c1f4000426dd799cfac97298c539e618909c057f;hpb=e40b06a0503b44bae5508a371d961914828214b6 diff --git a/src/position.cpp b/src/position.cpp index b3e86c85..3f819946 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -400,10 +400,8 @@ void Position::print(Move move) const { sync_cout; if (move) - { - Position p(*this); - cout << "\nMove is: " << (sideToMove == BLACK ? ".." : "") << move_to_san(p, move); - } + cout << "\nMove is: " << (sideToMove == BLACK ? ".." : "") + << move_to_san(*const_cast(this), move); for (Square sq = SQ_A1; sq <= SQ_H8; sq++) if (piece_on(sq) != NO_PIECE) @@ -1347,9 +1345,6 @@ void Position::clear() { for (int i = 0; i < 8; i++) for (int j = 0; j < 16; j++) pieceList[0][i][j] = pieceList[1][i][j] = SQ_NONE; - - for (Square sq = SQ_A1; sq <= SQ_H8; sq++) - board[sq] = NO_PIECE; }