Don't copy Position in pretty_pv()

Also let do_setup_move() don't reuse same StateInfo so that
we can remove the check about different StateInfo objects
before memcpy() in do_move.

Functional change due to harmless additionals
do_move() / undo_move() steps.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-01-09 11:22:59 +01:00
parent c89762288b
commit 15153a1de7
6 changed files with 30 additions and 36 deletions

View File

@@ -222,8 +222,7 @@ public:
bool square_is_weak(Square s, Color c) const;
// Doing and undoing moves
void detach();
void do_setup_move(Move m, StateInfo& St);
void do_setup_move(Move m);
void do_move(Move m, StateInfo& st);
void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck);
void undo_move(Move m);
@@ -278,6 +277,7 @@ private:
// Initialization helper functions (used while setting up a position)
void clear();
void detach();
void put_piece(Piece p, Square s);
void do_allow_oo(Color c);
void do_allow_ooo(Color c);