X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovegen.cpp;h=82ad60613c2513f0374bf01db25ef63debf4b26f;hb=edb4ab924f09abd7c6836c7017365dceccd76b80;hp=f0733c73b660f350c326905af2691d4a545a776d;hpb=3c0e86a91e48baea273306e45fb6cf13a59373cf;p=stockfish diff --git a/src/movegen.cpp b/src/movegen.cpp index f0733c73..82ad6061 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -234,19 +234,20 @@ namespace { } // namespace -/// Generates all pseudo-legal captures plus queen promotions -/// Generates all pseudo-legal non-captures and underpromotions -/// Generates all pseudo-legal check evasions when the side to move is in check -/// Generates all pseudo-legal non-captures giving check, except castling and promotions -/// Generates all pseudo-legal captures and non-captures -/// -/// Returns a pointer to the end of the move list. +// Generates all pseudo-legal captures plus queen promotions +// Generates all pseudo-legal non-captures and underpromotions +// Generates all pseudo-legal check evasions +// Generates all pseudo-legal captures and non-captures +// Generates all pseudo-legal non-captures giving check, +// except castling and promotions +// +// Returns a pointer to the end of the move list. template 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(); @@ -262,7 +263,7 @@ template ExtMove* generate(const Position&, ExtMove*); template ExtMove* generate(const Position&, ExtMove*); -/// generate generates all the legal moves in the given position +// generate generates all the legal moves in the given position template<> ExtMove* generate(const Position& pos, ExtMove* moveList) {