diff --git a/include/internal/catch_matchers_string.h b/include/internal/catch_matchers_string.h index 2a6d3ba0..69dabcb5 100644 --- a/include/internal/catch_matchers_string.h +++ b/include/internal/catch_matchers_string.h @@ -26,7 +26,7 @@ namespace Matchers { }; struct StringMatcherBase : MatcherBase { - StringMatcherBase( std::string operation, CasedString const& comparator ); + StringMatcherBase( std::string const& operation, CasedString const& comparator ); virtual std::string describe() const CATCH_OVERRIDE; CasedString m_comparator; diff --git a/include/internal/catch_matchers_string.hpp b/include/internal/catch_matchers_string.hpp index 107d8e2d..ca117eda 100644 --- a/include/internal/catch_matchers_string.hpp +++ b/include/internal/catch_matchers_string.hpp @@ -29,7 +29,7 @@ namespace Matchers { } - StringMatcherBase::StringMatcherBase( std::string operation, CasedString const& comparator ) + StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator ) : m_comparator( comparator ), m_operation( operation ) { } diff --git a/include/internal/catch_tag_alias.h b/include/internal/catch_tag_alias.h index 6dde74ad..bb23bc8d 100644 --- a/include/internal/catch_tag_alias.h +++ b/include/internal/catch_tag_alias.h @@ -15,7 +15,7 @@ namespace Catch { struct TagAlias { - TagAlias( std::string _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {} + TagAlias( std::string const& _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {} std::string tag; SourceLineInfo lineInfo; diff --git a/include/reporters/catch_reporter_compact.hpp b/include/reporters/catch_reporter_compact.hpp index 11e3b7c6..8d6f9085 100644 --- a/include/reporters/catch_reporter_compact.hpp +++ b/include/reporters/catch_reporter_compact.hpp @@ -169,7 +169,7 @@ namespace Catch { stream << result.getSourceInfo() << ':'; } - void printResultType( Colour::Code colour, std::string passOrFail ) const { + void printResultType( Colour::Code colour, std::string const& passOrFail ) const { if( !passOrFail.empty() ) { { Colour colourGuard( colour ); @@ -179,7 +179,7 @@ namespace Catch { } } - void printIssue( std::string issue ) const { + void printIssue( std::string const& issue ) const { stream << ' ' << issue; } diff --git a/include/reporters/catch_reporter_tap.hpp b/include/reporters/catch_reporter_tap.hpp index d2eeb3cd..8f8896a6 100644 --- a/include/reporters/catch_reporter_tap.hpp +++ b/include/reporters/catch_reporter_tap.hpp @@ -157,13 +157,13 @@ namespace Catch { stream << result.getSourceInfo() << ":"; } - void printResultType( std::string passOrFail ) const { + void printResultType( std::string const& passOrFail ) const { if( !passOrFail.empty() ) { stream << passOrFail << ' ' << counter << " -"; } } - void printIssue( std::string issue ) const { + void printIssue( std::string const& issue ) const { stream << " " << issue; }