X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=782cf1acc0dd5153fb8ba3bebad8cf69bc35da12;hp=f5b8b5e275aff3313b74ae061fd8b4455d98dab8;hb=eafb66e1aa1c034c1aa24933f1fb03da2f8f491f;hpb=68d1bebd8e030d7ca84158d36bb352126f0a72ee diff --git a/src/thread.cpp b/src/thread.cpp index f5b8b5e2..782cf1ac 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -371,10 +371,10 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits, SetupStates = states; // Ownership transfer here RootMoves.clear(); - for (MoveList ml(pos); !ml.end(); ++ml) + for (MoveList it(pos); *it; ++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