diff --git a/include/internal/catch_common.cpp b/include/internal/catch_common.cpp index 0f2f6eb4..7e24afc7 100644 --- a/include/internal/catch_common.cpp +++ b/include/internal/catch_common.cpp @@ -15,10 +15,6 @@ namespace Catch { - SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} bool SourceLineInfo::empty() const noexcept { return file[0] == '\0'; } @@ -38,7 +34,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..5b75bc07 100644 --- a/include/internal/catch_common.h +++ b/include/internal/catch_common.h @@ -43,7 +43,8 @@ namespace Catch { struct SourceLineInfo { SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept; + SourceLineInfo( char const* _file, std::size_t _line ) noexcept + : file( _file ), line( _line ) {} SourceLineInfo( SourceLineInfo const& other ) = default; SourceLineInfo( SourceLineInfo && ) = default; @@ -61,7 +62,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(); @@ -82,4 +83,3 @@ namespace Catch { ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) #endif // TWOBLUECUBES_CATCH_COMMON_H_INCLUDED - diff --git a/include/internal/catch_result_type.cpp b/include/internal/catch_result_type.cpp index 6e048865..0f62f1b8 100644 --- a/include/internal/catch_result_type.cpp +++ b/include/internal/catch_result_type.cpp @@ -22,7 +22,6 @@ namespace Catch { } bool shouldContinueOnFailure( int flags ) { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; } - bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } bool shouldSuppressFailure( int flags ) { return ( flags & ResultDisposition::SuppressFail ) != 0; } } // end namespace Catch diff --git a/include/internal/catch_result_type.h b/include/internal/catch_result_type.h index 6934fc11..000b4f3d 100644 --- a/include/internal/catch_result_type.h +++ b/include/internal/catch_result_type.h @@ -47,7 +47,7 @@ namespace Catch { ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ); bool shouldContinueOnFailure( int flags ); - bool isFalseTest( int flags ); + inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } bool shouldSuppressFailure( int flags ); } // end namespace Catch