forked from mirrors/linphone-iphone
fix(General): define L_LIKELY/L_UNLIKELY for Windows
This commit is contained in:
parent
eee82ef1ab
commit
613d1e61d3
1 changed files with 7 additions and 2 deletions
|
|
@ -71,8 +71,13 @@ void l_assert (const char *condition, const char *file, int line);
|
|||
#define L_ASSERT(CONDITION) ((CONDITION) ? static_cast<void>(0) : LINPHONE_NAMESPACE::l_assert(#CONDITION, __FILE__, __LINE__))
|
||||
#endif
|
||||
|
||||
#define L_LIKELY(EXPRESSION) __builtin_expect(static_cast<bool>(EXPRESSION), true)
|
||||
#define L_UNLIKELY(EXPRESSION) __builtin_expect(static_cast<bool>(EXPRESSION), false)
|
||||
#ifndef _MSC_VER
|
||||
#define L_LIKELY(EXPRESSION) __builtin_expect(static_cast<bool>(EXPRESSION), true)
|
||||
#define L_UNLIKELY(EXPRESSION) __builtin_expect(static_cast<bool>(EXPRESSION), false)
|
||||
#else
|
||||
#define L_LIKELY(EXPRESSION) EXPRESSION
|
||||
#define L_UNLIKELY(EXPRESSION) EXPRESSION
|
||||
#endif
|
||||
|
||||
// Allows access to private internal data.
|
||||
// Gives a control to C Wrapper.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue