[Libreoffice-commits] core.git: include/sal
Stephan Bergmann
sbergman at redhat.com
Wed Jan 6 04:48:11 PST 2016
include/sal/types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 55a5ac48c2abb4c7a97a829d3e9e2db86fafc081
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jan 6 13:46:48 2016 +0100
Get parenthesisation right
...for
#define COMMA ,
if (SAL_LIKELY(void() COMMA true)) ...
Change-Id: I607d3da52e769035b35cefe1103675d89d5a3b9b
diff --git a/include/sal/types.h b/include/sal/types.h
index f70422a..97806de 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -636,7 +636,7 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
Returns: the boolean value of expr (expressed as either int 1 or 0)
*/
-# define SAL_LIKELY(expr) (__builtin_expect(SAL_DETAIL_BOOLEAN_EXPR(expr), 1))
+# define SAL_LIKELY(expr) __builtin_expect(SAL_DETAIL_BOOLEAN_EXPR((expr)), 1)
/** An optimization annotation: denotes that expression is unlikely to be true.
@@ -648,7 +648,7 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
Returns: the boolean value of expr (expressed as either int 1 or 0)
*/
-# define SAL_UNLIKELY(expr) (__builtin_expect(SAL_DETAIL_BOOLEAN_EXPR(expr), 0))
+# define SAL_UNLIKELY(expr) __builtin_expect(SAL_DETAIL_BOOLEAN_EXPR((expr)), 0)
/** An optimization annotation: tells the compiler to work harder at this code
More information about the Libreoffice-commits
mailing list