]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Revert C++11 merge
[stockfish] / src / position.h
index 3947180f6f6528a404e6fc48d6b0d4af150ff128..14ce80996a85f8a65458131fe6de4b2f7997ba6e 100644 (file)
@@ -68,6 +68,11 @@ struct StateInfo {
 };
 
 
+/// When making a move the current StateInfo up to 'key' excluded is copied to
+/// the new one. Here we calculate the quad words (64 bit) needed to be copied.
+const size_t StateCopySize64 = offsetof(StateInfo, key) / sizeof(uint64_t) + 1;
+
+
 /// Position class stores information regarding the board representation as
 /// pieces, side to move, hash keys, castling info, etc. Important methods are
 /// do_move() and undo_move(), used by the search to update node info when
@@ -77,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
@@ -139,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 givesCheck);
+  void do_move(Move m, StateInfo& st, bool moveIsCheck);
   void undo_move(Move m);
   void do_null_move(StateInfo& st);
   void undo_null_move();
@@ -169,7 +175,7 @@ public:
   Value non_pawn_material(Color c) const;
 
   // Position consistency check, for debugging
-  bool pos_is_ok(int* failedStep = nullptr) const;
+  bool pos_is_ok(int* step = NULL) const;
   void flip();
 
 private: