From 5ff4ab0a764e6a47dd4708c9a39feb94f879efe9 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 29 Feb 2012 08:47:18 +0000 Subject: [PATCH] Suppress warning about constant conditional --- include/internal/catch_capture.hpp | 2 +- single_include/catch.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index 2c44ae57..a152962e 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -692,7 +692,7 @@ inline bool isTrue } catch( ... ){ \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false ); \ throw; \ - }}while(0) + }}while( Catch::isTrue( false ) ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \ diff --git a/single_include/catch.hpp b/single_include/catch.hpp index e32e6aec..1403642d 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1964,7 +1964,7 @@ inline bool isTrue } catch( ... ){ \ INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ) << Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() ).setResultType( Catch::ResultWas::ThrewException ), false ); \ throw; \ - }}while(0) + }}while( Catch::isTrue( false ) ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, isNot, stopOnFailure, macroName ) \