diff options
Diffstat (limited to 'externals/grill/flext/source/flprefix.h')
-rwxr-xr-x | externals/grill/flext/source/flprefix.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index 4568a1cc..0855f73d 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -412,5 +412,14 @@ WARRANTIES, see the file, "license.txt," in this distribution. #define STD #endif +// branching hints +#ifdef __GNUC__ +#define LIKELY(expression) (__builtin_expect(!!(expression), 1)) +#define UNLIKELY(expression) (__builtin_expect(!!(expression), 0)) +#else +#define LIKELY(expression) (expression) +#define UNLIKELY(expression) (expression) +#endif + #endif // __FLEXT_PREFIX_H |