mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 15:18:11 +00:00
feat(General): provide L_LIKELY and L_UNLIKELY macros (__builtin_expect)
This commit is contained in:
parent
4029e83de7
commit
99f2adb940
1 changed files with 3 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ 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)
|
||||
|
||||
// Allows access to private internal data.
|
||||
// Gives a control to C Wrapper.
|
||||
#define L_DECLARE_PRIVATE(CLASS) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue