X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=782cf1acc0dd5153fb8ba3bebad8cf69bc35da12;hp=f5b8b5e275aff3313b74ae061fd8b4455d98dab8;hb=d3608c4e79a29110f4c4a369d7207c6dd8e01f34;hpb=db322e6a63459bc3dfdf7fd537d42234b854fb76 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