diff --git a/src/position.cpp b/src/position.cpp index 5b4dba70..ade1c5d2 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -44,8 +44,6 @@ using std::string; //// Variables //// -int Position::castleRightsMask[64]; - Key Position::zobrist[2][8][64]; Key Position::zobEp[64]; Key Position::zobCastle[16]; diff --git a/src/position.h b/src/position.h index 0fce1860..71f821b2 100644 --- a/src/position.h +++ b/src/position.h @@ -328,12 +328,12 @@ private: Color sideToMove; int gamePly; Key history[MaxGameLength]; + int castleRightsMask[64]; File initialKFile, initialKRFile, initialQRFile; StateInfo startState; StateInfo* st; // Static variables - static int castleRightsMask[64]; static Key zobrist[2][8][64]; static Key zobEp[64]; static Key zobCastle[16]; diff --git a/src/search.cpp b/src/search.cpp index fcadc922..4592ac08 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -441,10 +441,6 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, { TM.set_active_threads(newActiveThreads); init_eval(TM.active_threads()); - // HACK: init_eval() destroys the static castleRightsMask[] array in the - // Position class. The below line repairs the damage. - Position p(pos.to_fen()); - assert(pos.is_ok()); } // Wake up sleeping threads