mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Implicit conversion from ExtMove to Move
Verified with perft there is no speed regression, and code is simpler. It is also conceptually correct becuase an extended move is just a move that happens to have also a score. No functional change.
This commit is contained in:
@@ -365,10 +365,10 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
|
||||
assert(!states.get());
|
||||
}
|
||||
|
||||
for (const ExtMove& ms : MoveList<LEGAL>(pos))
|
||||
for (const auto& m : MoveList<LEGAL>(pos))
|
||||
if ( limits.searchmoves.empty()
|
||||
|| std::count(limits.searchmoves.begin(), limits.searchmoves.end(), ms.move))
|
||||
RootMoves.push_back(RootMove(ms.move));
|
||||
|| std::count(limits.searchmoves.begin(), limits.searchmoves.end(), m))
|
||||
RootMoves.push_back(RootMove(m));
|
||||
|
||||
main()->thinking = true;
|
||||
main()->notify_one(); // Starts main thread
|
||||
|
||||
Reference in New Issue
Block a user