]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Reformat some comments and conditions
[stockfish] / src / movegen.cpp
index 6b28a52ecf0b911242e96f259c6414188b73b2de..cda43b3a5824af177645a75a2066d0c5bcf7d10b 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "movegen.h"
+
 #include <cassert>
+#include <initializer_list>
 
-#include "movegen.h"
+#include "bitboard.h"
 #include "position.h"
 
 namespace Stockfish {
@@ -233,9 +236,10 @@ namespace {
 
 /// <CAPTURES>     Generates all pseudo-legal captures plus queen promotions
 /// <QUIETS>       Generates all pseudo-legal non-captures and underpromotions
-/// <EVASIONS>     Generates all pseudo-legal check evasions when the side to move is in check
-/// <QUIET_CHECKS> Generates all pseudo-legal non-captures giving check, except castling and promotions
+/// <EVASIONS>     Generates all pseudo-legal check evasions
 /// <NON_EVASIONS> Generates all pseudo-legal captures and non-captures
+/// <QUIET_CHECKS> Generates all pseudo-legal non-captures giving check,
+///                except castling and promotions
 ///
 /// Returns a pointer to the end of the move list.
 
@@ -243,7 +247,7 @@ template<GenType Type>
 ExtMove* generate(const Position& pos, ExtMove* moveList) {
 
   static_assert(Type != LEGAL, "Unsupported type in generate()");
-  assert((Type == EVASIONS) == (bool)pos.checkers());
+  assert((Type == EVASIONS) == bool(pos.checkers()));
 
   Color us = pos.side_to_move();