From a0b3a9a92d28ec0b3a08b45b8c1449737f56dd34 Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Tue, 2 Sep 2014 15:21:30 -0400 Subject: [PATCH] Restore function-like semicolon-swallowing behavior to FC_THROW --- include/fc/exception/exception.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fc/exception/exception.hpp b/include/fc/exception/exception.hpp index aca2cc7..a3b26a0 100644 --- a/include/fc/exception/exception.hpp +++ b/include/fc/exception/exception.hpp @@ -299,11 +299,11 @@ namespace fc */ #define FC_ASSERT( TEST, ... ) \ FC_EXPAND_MACRO( \ - do { if( !(TEST) ) { FC_THROW_EXCEPTION( fc::assert_exception, #TEST ": " __VA_ARGS__ ); } } while(0); \ + do { if( !(TEST) ) { FC_THROW_EXCEPTION( fc::assert_exception, #TEST ": " __VA_ARGS__ ); } } while(0) \ ) #define FC_CAPTURE_AND_THROW( EXCEPTION_TYPE, ... ) \ - do { throw EXCEPTION_TYPE( FC_LOG_MESSAGE( error, "", FC_FORMAT_ARG_PARAMS(__VA_ARGS__) ) ); } while(false); + do { throw EXCEPTION_TYPE( FC_LOG_MESSAGE( error, "", FC_FORMAT_ARG_PARAMS(__VA_ARGS__) ) ); } while(0) //#define FC_THROW( FORMAT, ... ) // FC_INDIRECT_EXPAND workas around a bug in Visual C++ variadic macro processing that prevents it @@ -335,7 +335,7 @@ namespace fc do { \ ER.append_log( FC_LOG_MESSAGE( LOG_LEVEL, FORMAT, __VA_ARGS__ ) ); \ throw;\ - } while(false) + } while(0) #define FC_LOG_AND_RETHROW( ) \ catch( fc::exception& er ) { \