diff options
Diffstat (limited to 'webrtc/base/common.h')
-rw-r--r-- | webrtc/base/common.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webrtc/base/common.h b/webrtc/base/common.h index e615c7669a..1b1dac64b0 100644 --- a/webrtc/base/common.h +++ b/webrtc/base/common.h @@ -54,14 +54,16 @@ inline void RtcUnused(const void*) {} #endif // !defined(WEBRTC_WIN) -#define ARRAY_SIZE(x) (static_cast<int>(sizeof(x) / sizeof(x[0]))) - ///////////////////////////////////////////////////////////////////////////// // Assertions ///////////////////////////////////////////////////////////////////////////// #ifndef ENABLE_DEBUG -#define ENABLE_DEBUG _DEBUG +#if !defined(NDEBUG) +#define ENABLE_DEBUG 1 +#else +#define ENABLE_DEBUG 0 +#endif #endif // !defined(ENABLE_DEBUG) // Even for release builds, allow for the override of LogAssert. Though no @@ -176,7 +178,7 @@ inline bool ImplicitCastToBool(bool result) { return result; } // Forces compiler to inline, even against its better judgement. Use wisely. #if defined(__GNUC__) -#define FORCE_INLINE __attribute__((always_inline)) +#define FORCE_INLINE __attribute__ ((__always_inline__)) #elif defined(WEBRTC_WIN) #define FORCE_INLINE __forceinline #else @@ -191,7 +193,7 @@ inline bool ImplicitCastToBool(bool result) { return result; } // libjingle are merged. #if !defined(WARN_UNUSED_RESULT) #if defined(__GNUC__) || defined(__clang__) -#define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) #else #define WARN_UNUSED_RESULT #endif |