X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=99567bd7e22a608de7ca91a16d81058112661624;hp=9b36fd89fde9f9505dc54a2093bab49711cbf651;hb=22c557ca7ce957cfb164c56dd149f22e2f11c7f9;hpb=6a934882915f85c9f22c0bc60df6dbd469d89f10 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) {