Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_assertion_handler.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-05-14 23:45:59 +0200
committerMartin Hořeňovský2021-05-14 23:45:59 +0200
commit61e16416a99fe4ba48c1adfc46082276433be6c0 (patch)
tree57e892cc11a0d80b0fa9fd90237fdc0d0a186d34 /src/catch2/internal/catch_assertion_handler.cpp
parent074017f5ad759328826a93dbea8ea41cc4d6808d (diff)
downloadcatch3-61e16416a99fe4ba48c1adfc46082276433be6c0.tar.gz
Pass other StringRef arguments by value instead of by-ref
Apart from being clearer, it also improves the overall codesize of the implementation library, and should improve the performance as well, by removing one level of indirection.
Diffstat (limited to 'src/catch2/internal/catch_assertion_handler.cpp')
-rw-r--r--src/catch2/internal/catch_assertion_handler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp
index 7774ca68..828aa7cd 100644
--- a/src/catch2/internal/catch_assertion_handler.cpp
+++ b/src/catch2/internal/catch_assertion_handler.cpp
@@ -18,7 +18,7 @@
namespace Catch {
AssertionHandler::AssertionHandler
- ( StringRef const& macroName,
+ ( StringRef macroName,
SourceLineInfo const& lineInfo,
StringRef capturedExpression,
ResultDisposition::Flags resultDisposition )
@@ -29,7 +29,7 @@ namespace Catch {
void AssertionHandler::handleExpr( ITransientExpression const& expr ) {
m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction );
}
- void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) {
+ void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef message) {
m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction );
}
@@ -80,7 +80,7 @@ namespace Catch {
// This is the overload that takes a string and infers the Equals matcher from it
// The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp
- void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString ) {
+ void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) {
handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString );
}