Skip to content

Commit

Permalink
Use CMI_LIKELY in implementation of CmiEnforce/CmiAssert
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-charmworks committed Jun 22, 2023
1 parent 14e398d commit 499ec24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/conv-core/converse.h
Original file line number Diff line number Diff line change
Expand Up @@ -1084,13 +1084,13 @@ void __CmiEnforceMsgHelper(const char* expr, const char* fileName,
const char* lineNum, const char* msg, ...);

#define CmiEnforce(expr) \
((void)((expr) ? 0 \
((void)(CMI_LIKELY(expr) ? 0 \
: (__CmiEnforceHelper(__CMK_STRING(expr), __FILE__, \
__CMK_XSTRING(__LINE__)), \
0)))

#define CmiEnforceMsg(expr, ...) \
((void)((expr) \
((void)(CMI_LIKELY(expr) \
? 0 \
: (__CmiEnforceMsgHelper(__CMK_STRING(expr), __FILE__, \
__CMK_XSTRING(__LINE__), __VA_ARGS__), \
Expand Down

0 comments on commit 499ec24

Please sign in to comment.