diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp index 9f205465..595336d4 100644 --- a/include/internal/catch_capture.hpp +++ b/include/internal/catch_capture.hpp @@ -63,7 +63,7 @@ CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( Catch::isTrue( false && static_cast( !!(__VA_ARGS__) ) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look + } while( Catch::isTrue(false) && static_cast( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. /////////////////////////////////////////////////////////////////////////////// diff --git a/include/internal/catch_common.cpp b/include/internal/catch_common.cpp index 0f2f6eb4..470b7ea9 100644 --- a/include/internal/catch_common.cpp +++ b/include/internal/catch_common.cpp @@ -38,7 +38,6 @@ namespace Catch { return os; } - bool isTrue( bool value ){ return value; } bool alwaysTrue() { return true; } bool alwaysFalse() { return false; } diff --git a/include/internal/catch_common.h b/include/internal/catch_common.h index 617a9343..026ac2bb 100644 --- a/include/internal/catch_common.h +++ b/include/internal/catch_common.h @@ -61,7 +61,7 @@ namespace Catch { std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); // This is just here to avoid compiler warnings with macro constants and boolean literals - bool isTrue( bool value ); + inline bool isTrue( bool value ){ return value; } bool alwaysTrue(); bool alwaysFalse();