Add FC_LIKELY and FC_UNLIKELY macros
These wrap __builtin_expect where it exists.
This commit is contained in:
parent
835f9bbdbe
commit
76699a4813
|
@ -57,6 +57,14 @@
|
||||||
#define FC_CONFIG_PATH "fonts.conf"
|
#define FC_CONFIG_PATH "fonts.conf"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define FC_LIKELY(expr) (expr)
|
||||||
|
#define FC_UNLIKELY(expr) (expr)
|
||||||
|
#else
|
||||||
|
#define FC_LIKELY(expr) (__builtin_expect (expr, 1))
|
||||||
|
#define FC_UNLIKELY(expr) (__builtin_expect (expr, 0))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include "fcwindows.h"
|
# include "fcwindows.h"
|
||||||
typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
|
typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
|
||||||
|
|
Loading…
Reference in New Issue