Correctly handle handover of setup states
[stockfish] / src / search.h
index d580b54695744fe79a62e6c777adbca4ddafc61c..63b9b3264a7fb1f138bbe7e6705e119602069251 100644 (file)
 #define SEARCH_H_INCLUDED
 
 #include <cstring>
+#include <memory>
+#include <stack>
 #include <vector>
 
 #include "misc.h"
+#include "position.h"
 #include "types.h"
 
-class Position;
 struct SplitPoint;
 
 namespace Search {
@@ -91,11 +93,14 @@ struct SignalsType {
   bool stopOnPonderhit, firstRootMove, stop, failedLowAtRoot;
 };
 
+typedef std::auto_ptr<std::stack<StateInfo> > StateStackPtr;
+
 extern volatile SignalsType Signals;
 extern LimitsType Limits;
 extern std::vector<RootMove> RootMoves;
 extern Position RootPosition;
 extern Time SearchTime;
+extern StateStackPtr SetupStates;
 
 extern void init();
 extern size_t perft(Position& pos, Depth depth);