diff options
| author | Martin Hořeňovský | 2024-09-13 13:42:03 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2024-09-13 16:39:51 +0200 |
| commit | 412cad546a89cda9eaa8ef77d8161b719182cc9e (patch) | |
| tree | dafc5cbabcf0959a882f5888f9bed060396d6ef7 /src/catch2/internal/catch_assertion_handler.cpp | |
| parent | bd70515c0831bb741eb1865e9ed31d321417d735 (diff) | |
| download | catch3-412cad546a89cda9eaa8ef77d8161b719182cc9e.tar.gz | |
Avoid needless copy of string in runContext::handleMessage
Diffstat (limited to 'src/catch2/internal/catch_assertion_handler.cpp')
| -rw-r--r-- | src/catch2/internal/catch_assertion_handler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp index f650a707..9a28e79c 100644 --- a/src/catch2/internal/catch_assertion_handler.cpp +++ b/src/catch2/internal/catch_assertion_handler.cpp @@ -28,8 +28,8 @@ namespace Catch { void AssertionHandler::handleExpr( ITransientExpression const& expr ) { m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction ); } - void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef message) { - m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction ); + void AssertionHandler::handleMessage(ResultWas::OfType resultType, std::string&& message) { + m_resultCapture.handleMessage( m_assertionInfo, resultType, CATCH_MOVE(message), m_reaction ); } auto AssertionHandler::allowThrows() const -> bool { |