From 51da1ec36664827b8894a9ecc2016d5746814725 Mon Sep 17 00:00:00 2001 From: Konstantin Baumann Date: Thu, 31 Jan 2013 10:46:05 +0100 Subject: [PATCH] fix MSVC compiler warnings this fix fixes this MSVC compiler warning: warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) --- include/internal/catch_result_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/internal/catch_result_type.h b/include/internal/catch_result_type.h index 9fd23861..2b2ceb77 100644 --- a/include/internal/catch_result_type.h +++ b/include/internal/catch_result_type.h @@ -54,9 +54,9 @@ namespace Catch { return static_cast( static_cast( lhs ) | static_cast( rhs ) ); } - inline bool shouldContinueOnFailure( int flags ) { return flags & ResultDisposition::ContinueOnFailure; } - inline bool shouldNegate( int flags ) { return flags & ResultDisposition::NegateResult; } - inline bool shouldSuppressFailure( int flags ) { return flags & ResultDisposition::SuppressFail; } + inline bool shouldContinueOnFailure( int flags ) { return ((flags & ResultDisposition::ContinueOnFailure) != 0); } + inline bool shouldNegate( int flags ) { return ((flags & ResultDisposition::NegateResult) != 0); } + inline bool shouldSuppressFailure( int flags ) { return ((flags & ResultDisposition::SuppressFail) != 0); } } // end namespace Catch