Remove pointless StringRef -> std::string conversions

This commit is contained in:
Martin Hořeňovský 2017-11-13 13:08:59 +01:00
parent 0adb04807a
commit a06b6dc3ea

View File

@ -54,7 +54,7 @@ namespace Catch {
std::string AssertionResult::getExpression() const { std::string AssertionResult::getExpression() const {
if( isFalseTest( m_info.resultDisposition ) ) if( isFalseTest( m_info.resultDisposition ) )
return "!(" + std::string(m_info.capturedExpression) + ")"; return "!(" + m_info.capturedExpression + ")";
else else
return m_info.capturedExpression; return m_info.capturedExpression;
} }
@ -65,9 +65,9 @@ namespace Catch {
expr = m_info.capturedExpression; expr = m_info.capturedExpression;
else { else {
expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
expr += m_info.macroName; expr += m_info.macroName.c_str();
expr += "( "; expr += "( ";
expr += m_info.capturedExpression; expr += m_info.capturedExpression.c_str();
expr += " )"; expr += " )";
} }
return expr; return expr;