Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_utildefines.h
| Show First 20 Lines • Show All 617 Lines • ▼ Show 20 Lines | |||||
| #ifdef __GNUC__ | #ifdef __GNUC__ | ||||
| # define LIKELY(x) __builtin_expect(!!(x), 1) | # define LIKELY(x) __builtin_expect(!!(x), 1) | ||||
| # define UNLIKELY(x) __builtin_expect(!!(x), 0) | # define UNLIKELY(x) __builtin_expect(!!(x), 0) | ||||
| #else | #else | ||||
| # define LIKELY(x) (x) | # define LIKELY(x) (x) | ||||
| # define UNLIKELY(x) (x) | # define UNLIKELY(x) (x) | ||||
| #endif | #endif | ||||
| #ifdef __GNUC__ | |||||
| # define DO_PRAGMA(x) _Pragma #x | |||||
| #else | |||||
| # define DO_PRAGMA(x) __pragma #x | |||||
| #endif | |||||
| #define __MESSAGE(text) __pragma( message(__FILE__ "(" STRINGIFY(__LINE__) ")" text) ) | |||||
| #define BLENDER_ERROR(text) __MESSAGE( " : Error: " #text ) | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif /* __BLI_UTILDEFINES_H__ */ | #endif /* __BLI_UTILDEFINES_H__ */ | ||||