X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=51c05b2ffc12139ac8b6eca184b5b6707791d24a;hp=8eb994551d2d6ffc7515217b05ee03a86c0e326d;hb=3e95800814d70587fb6b12efb33faea4c7228f88;hpb=cbb1a8ed31679fe32d2694448a10b031390a32b3 diff --git a/src/types.h b/src/types.h index 8eb99455..51c05b2f 100644 --- a/src/types.h +++ b/src/types.h @@ -42,6 +42,8 @@ #include "platform.h" +#define unlikely(x) (x) // For code annotation purposes + #if defined(_WIN64) && !defined(IS_64BIT) # include // MSVC popcnt and bsfq instrinsics # define IS_64BIT @@ -71,14 +73,6 @@ # define FORCE_INLINE inline #endif -#ifdef __GNUC__ -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) -#else -# define likely(x) (x) -# define unlikely(x) (x) -#endif - #if defined(USE_POPCNT) const bool HasPopCnt = true; #else @@ -319,12 +313,12 @@ inline Score operator/(Score s, int i) { extern Value PieceValue[PHASE_NB][PIECE_NB]; -struct MoveStack { +struct ExtMove { Move move; int score; }; -inline bool operator<(const MoveStack& f, const MoveStack& s) { +inline bool operator<(const ExtMove& f, const ExtMove& s) { return f.score < s.score; }