X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=34fcc17637211029366f6868bb0bcf8d392cb971;hp=450df57539ca9349ded64dd855f8f7eae50f22bf;hb=65f46794af41534e0dc744c6f7531a4c43eca857;hpb=81d6c4a0d60f589f36a970f48bf179ae509aa4b0 diff --git a/src/search.cpp b/src/search.cpp index 450df575..34fcc176 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -152,19 +152,19 @@ uint64_t Search::perft(Position& pos, Depth depth) { CheckInfo ci(pos); const bool leaf = (depth == 2 * ONE_PLY); - for (const ExtMove& ms : MoveList(pos)) + for (const auto& m : MoveList(pos)) { if (Root && depth <= ONE_PLY) cnt = 1, nodes++; else { - pos.do_move(ms.move, st, ci, pos.gives_check(ms.move, ci)); + pos.do_move(m, st, ci, pos.gives_check(m, ci)); cnt = leaf ? MoveList(pos).size() : perft(pos, depth - ONE_PLY); nodes += cnt; - pos.undo_move(ms.move); + pos.undo_move(m); } if (Root) - sync_cout << UCI::move(ms.move, pos.is_chess960()) << ": " << cnt << sync_endl; + sync_cout << UCI::move(m, pos.is_chess960()) << ": " << cnt << sync_endl; } return nodes; }