X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=14ce80996a85f8a65458131fe6de4b2f7997ba6e;hb=856a5f3aaaf8b9d53599963decacd4476b55c034;hp=0bb7b0b99ada88507cecd6f6f0518031c4e5c7a5;hpb=1277a428237eec3299c6606951fac014bb3ef851;p=stockfish diff --git a/src/position.h b/src/position.h index 0bb7b0b9..14ce8099 100644 --- a/src/position.h +++ b/src/position.h @@ -82,11 +82,12 @@ class Position { friend std::ostream& operator<<(std::ostream&, const Position&); + Position(const Position&); // Disable the default copy constructor + public: static void init(); - Position() = default; // To define the global object RootPos - Position(const Position&) = delete; + Position() {} // To define the global object RootPos Position(const Position& pos, Thread* th) { *this = pos; thisThread = th; } Position(const std::string& f, bool c960, Thread* th) { set(f, c960, th); } Position& operator=(const Position&); // To assign RootPos from UCI @@ -144,7 +145,7 @@ public: // Doing and undoing moves void do_move(Move m, StateInfo& st); - void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck); + void do_move(Move m, StateInfo& st, bool moveIsCheck); void undo_move(Move m); void do_null_move(StateInfo& st); void undo_null_move(); @@ -174,7 +175,7 @@ public: Value non_pawn_material(Color c) const; // Position consistency check, for debugging - bool pos_is_ok(int* step = nullptr) const; + bool pos_is_ok(int* step = NULL) const; void flip(); private: