X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftypes.h;h=0575f1d453cd3e371ec4305144f568c93459796f;hb=15d47a2b3821b92c4d048f39f7f43c301299d365;hp=c76efd077d1760969acbe12a6c9fb9ff3803c19f;hpb=2d0237db3f0e596fb06e3ffbadba84dcc4e018f6;p=stockfish diff --git a/src/types.h b/src/types.h index c76efd07..0575f1d4 100644 --- a/src/types.h +++ b/src/types.h @@ -205,9 +205,8 @@ constexpr Value PieceValue[PIECE_NB] = { using Depth = int; enum : int { - DEPTH_QS_CHECKS = 0, - DEPTH_QS_NO_CHECKS = -1, - DEPTH_QS_RECAPTURES = -5, + DEPTH_QS_CHECKS = 0, + DEPTH_QS_NO_CHECKS = -1, DEPTH_NONE = -6, @@ -321,21 +320,17 @@ constexpr Square operator-(Square s, Direction d) { return Square(int(s) - int(d inline Square& operator+=(Square& s, Direction d) { return s = s + d; } inline Square& operator-=(Square& s, Direction d) { return s = s - d; } -constexpr Color operator~(Color c) { - return Color(c ^ BLACK); // Toggle color -} +// Toggle color +constexpr Color operator~(Color c) { return Color(c ^ BLACK); } -constexpr Square flip_rank(Square s) { // Swap A1 <-> A8 - return Square(s ^ SQ_A8); -} +// Swap A1 <-> A8 +constexpr Square flip_rank(Square s) { return Square(s ^ SQ_A8); } -constexpr Square flip_file(Square s) { // Swap A1 <-> H1 - return Square(s ^ SQ_H1); -} +// Swap A1 <-> H1 +constexpr Square flip_file(Square s) { return Square(s ^ SQ_H1); } -constexpr Piece operator~(Piece pc) { - return Piece(pc ^ 8); // Swap color of piece B_KNIGHT <-> W_KNIGHT -} +// Swap color of piece B_KNIGHT <-> W_KNIGHT +constexpr Piece operator~(Piece pc) { return Piece(pc ^ 8); } constexpr CastlingRights operator&(Color c, CastlingRights cr) { return CastlingRights((c == WHITE ? WHITE_CASTLING : BLACK_CASTLING) & cr);