Avoid needless copy of string in runContext::handleMessage

This commit is contained in:
Martin Hořeňovský committed 2024-09-13 16:39:51 +02:00
1 parent bd70515c08
commit 412cad546a
5 files changed
+7 -7

No files matched your search

@@ -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 {