X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsquare.h;h=46456d0677c88fed74609a2a9654e68245ba830a;hp=1c4a39023582c62de6fc92d5bd1bfee045624168;hb=caa02b0e43dbce0c723bc6499aab811ca3e5408e;hpb=4dded4e72f9b9582db8adc9a478e9eda5841d8c5 diff --git a/src/square.h b/src/square.h index 1c4a3902..46456d06 100644 --- a/src/square.h +++ b/src/square.h @@ -68,10 +68,10 @@ enum SquareDelta { DELTA_NW = DELTA_N + DELTA_W }; -ENABLE_OPERATORS_ON(Square); -ENABLE_OPERATORS_ON(File); -ENABLE_OPERATORS_ON(Rank); -ENABLE_OPERATORS_ON(SquareDelta); +ENABLE_OPERATORS_ON(Square) +ENABLE_OPERATORS_ON(File) +ENABLE_OPERATORS_ON(Rank) +ENABLE_OPERATORS_ON(SquareDelta) //// @@ -177,7 +177,7 @@ inline bool rank_is_ok(Rank r) { } inline bool square_is_ok(Square s) { - return file_is_ok(square_file(s)) && rank_is_ok(square_rank(s)); + return s >= SQ_A1 && s <= SQ_H8; } #endif // !defined(SQUARE_H_INCLUDED)