]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Rewrite pos_is_ok()
[stockfish] / src / position.h
index 8afbd83e2e9aeb322f9e80aa9a6752183565000e..679a636d30154080f7e276adc11c02053b70476d 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <cassert>
 #include <cstddef>  // For offsetof()
+#include <string>
 
 #include "bitboard.h"
 #include "types.h"
@@ -81,12 +82,11 @@ class Position {
 
   friend std::ostream& operator<<(std::ostream&, const Position&);
 
-  Position(const Position&); // Disable the default copy constructor
-
 public:
   static void init();
 
-  Position() {} // To define the global object RootPos
+  Position() = default; // To define the global object RootPos
+  Position(const Position&) = delete;
   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
@@ -174,7 +174,7 @@ public:
   Value non_pawn_material(Color c) const;
 
   // Position consistency check, for debugging
-  bool pos_is_ok(int* step = NULL) const;
+  bool pos_is_ok(bool fast = true, int* failedStep = nullptr) const;
   void flip();
 
 private: