]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Revert C++11 merge
[stockfish] / src / uci.cpp
index dfcce4970a67eb6910b38002464fe7dae687eeb7..1b91b451f3b62124ae267d28659ec656461f541e 100644 (file)
@@ -274,9 +274,9 @@ Move UCI::to_move(const Position& pos, string& str) {
   if (str.length() == 5) // Junior could send promotion piece in uppercase
       str[4] = char(tolower(str[4]));
 
-  for (const ExtMove& ms : MoveList<LEGAL>(pos))
-      if (str == UCI::move(ms.move, pos.is_chess960()))
-          return ms.move;
+  for (MoveList<LEGAL> it(pos); *it; ++it)
+      if (str == UCI::move(*it, pos.is_chess960()))
+          return *it;
 
   return MOVE_NONE;
 }