mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
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:
parent
17e09be3b9
commit
75200b462c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user