]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Introduce and use struct MoveList
[stockfish] / src / position.cpp
index 1e01dc1f7298f5ece888713fb3edcdf3fd215910..7490953dbe3dd16a2034303bde978fe00ad4c10d 100644 (file)
@@ -1724,8 +1724,7 @@ template bool Position::is_draw<true>() const;
 
 bool Position::is_mate() const {
 
-  MoveStack moves[MAX_MOVES];
-  return in_check() && generate<MV_LEGAL>(*this, moves) == moves;
+  return in_check() && !MoveList<MV_LEGAL>(*this).size();
 }