X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=0d2cdd3bc8cd20d4479b2cf2d5c6ba5ab0217d2e;hp=fb938a3084645d2dc02741e12a3c728021def433;hb=1b69ef8e6c121f64b998533e5393470dad3a8453;hpb=67338e6f322b8f8ec0d897815e16a87937efc9b0 diff --git a/src/types.h b/src/types.h index fb938a30..0d2cdd3b 100644 --- a/src/types.h +++ b/src/types.h @@ -34,11 +34,6 @@ /// -DUSE_POPCNT | Add runtime support for use of popcnt asm-instruction. Works /// | only in 64-bit mode. For compiling requires hardware with /// | popcnt support. -/// -/// -DOLD_LOCKS | Under Windows are used the fast Slim Reader/Writer (SRW) -/// | Locks and Condition Variables: these are not supported by -/// | Windows XP and older, to compile for those platforms you -/// | should enable OLD_LOCKS. #include #include @@ -339,6 +334,14 @@ extern const Value PieceValueMidgame[17]; extern const Value PieceValueEndgame[17]; extern int SquareDistance[64][64]; +inline Color operator~(Color c) { + return Color(c ^ 1); +} + +inline Square operator~(Square s) { + return Square(s ^ 56); +} + inline Value mate_in(int ply) { return VALUE_MATE - ply; } @@ -359,10 +362,6 @@ inline Color color_of(Piece p) { return Color(p >> 3); } -inline Color flip(Color c) { - return Color(c ^ 1); -} - inline Square make_square(File f, Rank r) { return Square((r << 3) | f); } @@ -379,10 +378,6 @@ inline Rank rank_of(Square s) { return Rank(s >> 3); } -inline Square flip(Square s) { - return Square(s ^ 56); -} - inline Square mirror(Square s) { return Square(s ^ 7); }