fix MSVC compiler warnings

this fix fixes this MSVC compiler warning:
warning C4800: 'int' : forcing value to bool 'true' or 'false'
(performance warning)
This commit is contained in:
Konstantin Baumann 2013-01-31 10:46:05 +01:00
parent 51c69dbc33
commit 51da1ec366

View File

@ -54,9 +54,9 @@ namespace Catch {
return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) ); return static_cast<ResultDisposition::Flags>( static_cast<int>( lhs ) | static_cast<int>( rhs ) );
} }
inline bool shouldContinueOnFailure( int flags ) { return flags & ResultDisposition::ContinueOnFailure; } inline bool shouldContinueOnFailure( int flags ) { return ((flags & ResultDisposition::ContinueOnFailure) != 0); }
inline bool shouldNegate( int flags ) { return flags & ResultDisposition::NegateResult; } inline bool shouldNegate( int flags ) { return ((flags & ResultDisposition::NegateResult) != 0); }
inline bool shouldSuppressFailure( int flags ) { return flags & ResultDisposition::SuppressFail; } inline bool shouldSuppressFailure( int flags ) { return ((flags & ResultDisposition::SuppressFail) != 0); }
} // end namespace Catch } // end namespace Catch