X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=99567bd7e22a608de7ca91a16d81058112661624;hp=9b36fd89fde9f9505dc54a2093bab49711cbf651;hb=a2f46446cf1c91bc293a6acea9ce268e81534042;hpb=c45a4e0b48d7f5c570637d63592a07e185476334 diff --git a/src/types.h b/src/types.h index 9b36fd89..99567bd7 100644 --- a/src/types.h +++ b/src/types.h @@ -35,6 +35,7 @@ /// | only in 64-bit mode. For compiling requires hardware with /// | popcnt support. +#include #include #include #include @@ -391,7 +392,8 @@ inline PieceType type_of(Piece p) { } inline Color color_of(Piece p) { - return p == NO_PIECE ? NO_COLOR : Color(p >> 3); + assert(p != NO_PIECE); + return Color(p >> 3); } inline bool is_ok(Square s) {