diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-07 15:10:11 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-07 19:23:02 +0000 |
commit | 3d0b54bd014b5567cbf1dcf655cf49431ca7a6e6 (patch) | |
tree | 18957fd31af6fd3d83e33085fdeeebd829fac75a /contrib/epee | |
parent | Merge pull request #2845 (diff) | |
download | monero-3d0b54bd014b5567cbf1dcf655cf49431ca7a6e6.tar.xz |
epee: add do while(0) around brace statement in a macro
Allows use in more complex expressions
Diffstat (limited to 'contrib/epee')
-rw-r--r-- | contrib/epee/include/misc_log_ex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h index 7ac07d112..67fd93206 100644 --- a/contrib/epee/include/misc_log_ex.h +++ b/contrib/epee/include/misc_log_ex.h @@ -169,7 +169,7 @@ namespace debug #define ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());} -#define CHECK_AND_ASSERT_THROW_MES(expr, message) {if(!(expr)) ASSERT_MES_AND_THROW(message);} +#define CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0) #ifndef CHECK_AND_ASSERT |