Commit 76699a48 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Add FC_LIKELY and FC_UNLIKELY macros

These wrap __builtin_expect where it exists.
parent 835f9bbd
......@@ -57,6 +57,14 @@
#define FC_CONFIG_PATH "fonts.conf"
#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
# include "fcwindows.h"
typedef UINT (WINAPI *pfnGetSystemWindowsDirectory)(LPSTR, UINT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment