mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Explicitly pass RootMoves to TB probes
Currently Search::RootMoves is accessed and even modified by TB probing functions in a hidden and sneaky way. This is bad practice and makes the code tricky. Instead explicily pass the vector as function argument so to clarify that the vector is modified inside the functions. No functional change.
This commit is contained in:
committed by
Joona Kiiski
parent
eeb6d923fa
commit
ba1464751d
@@ -68,6 +68,7 @@ struct RootMove {
|
||||
std::vector<Move> pv;
|
||||
};
|
||||
|
||||
typedef std::vector<RootMove> RootMoveVector;
|
||||
|
||||
/// The LimitsType struct stores information sent by GUI about available time
|
||||
/// to search the current move, maximum depth/time, if we are in analysis mode
|
||||
@@ -98,7 +99,7 @@ typedef std::auto_ptr<std::stack<StateInfo> > StateStackPtr;
|
||||
|
||||
extern volatile SignalsType Signals;
|
||||
extern LimitsType Limits;
|
||||
extern std::vector<RootMove> RootMoves;
|
||||
extern RootMoveVector RootMoves;
|
||||
extern Position RootPos;
|
||||
extern Time::point SearchTime;
|
||||
extern StateStackPtr SetupStates;
|
||||
|
||||
Reference in New Issue
Block a user