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:
Marco Costalba
2015-01-31 18:39:51 +01:00
parent 81d6c4a0d6
commit 65f46794af
5 changed files with 15 additions and 13 deletions

View File

@@ -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