mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Mimic an iterator for looping across MoveList
Seems more conventional. No functional change.
This commit is contained in:
@@ -371,10 +371,10 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
|
||||
SetupStates = states; // Ownership transfer here
|
||||
RootMoves.clear();
|
||||
|
||||
for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)
|
||||
for (MoveList<LEGAL> it(pos); !it.end(); ++it)
|
||||
if ( searchMoves.empty()
|
||||
|| std::count(searchMoves.begin(), searchMoves.end(), ml.move()))
|
||||
RootMoves.push_back(RootMove(ml.move()));
|
||||
|| std::count(searchMoves.begin(), searchMoves.end(), *it))
|
||||
RootMoves.push_back(RootMove(*it));
|
||||
|
||||
main_thread()->thinking = true;
|
||||
main_thread()->notify_one(); // Starts main thread
|
||||
|
||||
Reference in New Issue
Block a user