diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-17 12:22:39 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-19 11:59:20 +0000 |
commit | 2fdee490745a6c3a75691907aadf8ae38c57234c (patch) | |
tree | e36fc2b7bfe64cb1ecfc32178121a7a39835d36a /src/cairo-compiler-private.h | |
parent | 97edc680c189205ac2f4e150009f1f1cbe55ba1a (diff) |
[compiler] likelihood macros
Behdad prefers these to be upper-case to be consistent with G_UNLIKELY and
friends. However, as I intend to use these for nearly all instances of
if(status), I suggest that we keep to the short and not so loud:
if (unlikely (status))
return status;
Diffstat (limited to 'src/cairo-compiler-private.h')
-rw-r--r-- | src/cairo-compiler-private.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h index 76b8e801..44d9de30 100644 --- a/src/cairo-compiler-private.h +++ b/src/cairo-compiler-private.h @@ -149,11 +149,11 @@ _cairo_boolean_var_ = 0; \ _cairo_boolean_var_; \ }) -#define _cairo_likely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 1)) -#define _cairo_unlikely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 0)) +#define likely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 1)) +#define unlikely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 0)) #else -#define _cairo_likely(expr) (expr) -#define _cairo_unlikely(expr) (expr) +#define likely(expr) (expr) +#define unlikely(expr) (expr) #endif #ifndef __GNUC__ |