From 75200b462c51fe1af163b0727325af3367d1fe21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 13 Jan 2019 23:22:28 +0100 Subject: [PATCH] Change CATCH_BREAK_INTO_DEBUGGER to always expand into a function call This avoids -Wextra-semi-stmt warning inside our code --- include/internal/catch_debugger.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/internal/catch_debugger.h b/include/internal/catch_debugger.h index 75419842..db3ff681 100644 --- a/include/internal/catch_debugger.h +++ b/include/internal/catch_debugger.h @@ -38,12 +38,9 @@ namespace Catch { #endif #ifdef CATCH_TRAP - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } + #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }() #else - namespace Catch { - inline void doNothing() {} - } - #define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing() + #define CATCH_BREAK_INTO_DEBUGGER() []{}() #endif #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED