Change CATCH_BREAK_INTO_DEBUGGER to always expand into a function call

This avoids -Wextra-semi-stmt warning inside our code
This commit is contained in:
Martin Hořeňovský 2019-01-13 23:22:28 +01:00
parent 17e09be3b9
commit 75200b462c
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -38,12 +38,9 @@ namespace Catch {
#endif #endif
#ifdef CATCH_TRAP #ifdef CATCH_TRAP
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
#else #else
namespace Catch { #define CATCH_BREAK_INTO_DEBUGGER() []{}()
inline void doNothing() {}
}
#define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing()
#endif #endif
#endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED