Remove global TB variables from search.cpp

Follow up cleanup of #4968, removes the global variables from search and
instead uses a dedicated tb config struct.

closes https://github.com/official-stockfish/Stockfish/pull/4982

No functional change
This commit is contained in:
Disservin
2024-01-14 14:29:12 +01:00
parent 32e46fc47f
commit a5675f19d8
6 changed files with 89 additions and 75 deletions
+3 -1
View File
@@ -29,6 +29,7 @@
#include "misc.h"
#include "movepick.h"
#include "position.h"
#include "syzygy/tbprobe.h"
#include "timeman.h"
#include "types.h"
@@ -48,7 +49,6 @@ class UCI;
namespace Search {
// Stack struct keeps track of the information we need to remember from nodes
// shallower and deeper in the tree during the search. Each search thread has
// its own array of Stack objects, indexed by the current ply.
@@ -238,6 +238,8 @@ class Worker {
// The main thread has a SearchManager, the others have a NullSearchManager
std::unique_ptr<ISearchManager> manager;
Tablebases::Config tbConfig;
const OptionsMap& options;
ThreadPool& threads;
TranspositionTable& tt;