X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;fp=src%2Ftypes.h;h=0c512f5bf3f7544afcae25a0cb451fb31d952ece;hp=969d4e65e087f53643d2c7ff1e669d17a3924113;hb=ab5cd8340f2f7f8730aa7c77476edf4a98a166e4;hpb=11483fe6d942a4fee6fa272f72251d6b6d6d7454 diff --git a/src/types.h b/src/types.h index 969d4e65..0c512f5b 100644 --- a/src/types.h +++ b/src/types.h @@ -349,16 +349,16 @@ constexpr Color operator~(Color c) { return Color(c ^ BLACK); // Toggle color } -constexpr Square flip_rank(Square s) { +constexpr Square flip_rank(Square s) { // Swap A1 <-> A8 return Square(s ^ SQ_A8); } -constexpr Square flip_file(Square s) { +constexpr Square flip_file(Square s) { // Swap A1 <-> H1 return Square(s ^ SQ_H1); } constexpr Piece operator~(Piece pc) { - return Piece(pc ^ 8); // Swap color of piece B_KNIGHT -> W_KNIGHT + return Piece(pc ^ 8); // Swap color of piece B_KNIGHT <-> W_KNIGHT } constexpr CastlingRights operator&(Color c, CastlingRights cr) {