forked from catchorg/Catch2
Changed "const X ref"s to "X const ref"s
- Brought older code up to current convention (with the help of a Python script)
This commit is contained in:
@@ -17,13 +17,13 @@ namespace Catch {
|
||||
ExpressionResultBuilder::ExpressionResultBuilder( ResultWas::OfType resultType ) {
|
||||
m_data.resultType = resultType;
|
||||
}
|
||||
ExpressionResultBuilder::ExpressionResultBuilder( const ExpressionResultBuilder& other )
|
||||
ExpressionResultBuilder::ExpressionResultBuilder( ExpressionResultBuilder const& other )
|
||||
: m_data( other.m_data ),
|
||||
m_exprComponents( other.m_exprComponents )
|
||||
{
|
||||
m_stream << other.m_stream.str();
|
||||
}
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::operator=(const ExpressionResultBuilder& other ) {
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::operator=(ExpressionResultBuilder const& other ) {
|
||||
m_data = other.m_data;
|
||||
m_exprComponents = other.m_exprComponents;
|
||||
m_stream.str("");
|
||||
@@ -42,19 +42,19 @@ namespace Catch {
|
||||
m_exprComponents.shouldNegate = shouldNegate( resultDisposition );
|
||||
return *this;
|
||||
}
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setLhs( const std::string& lhs ) {
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setLhs( std::string const& lhs ) {
|
||||
m_exprComponents.lhs = lhs;
|
||||
return *this;
|
||||
}
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setRhs( const std::string& rhs ) {
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setRhs( std::string const& rhs ) {
|
||||
m_exprComponents.rhs = rhs;
|
||||
return *this;
|
||||
}
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setOp( const std::string& op ) {
|
||||
ExpressionResultBuilder& ExpressionResultBuilder::setOp( std::string const& op ) {
|
||||
m_exprComponents.op = op;
|
||||
return *this;
|
||||
}
|
||||
AssertionResult ExpressionResultBuilder::buildResult( const AssertionInfo& info ) const
|
||||
AssertionResult ExpressionResultBuilder::buildResult( AssertionInfo const& info ) const
|
||||
{
|
||||
assert( m_data.resultType != ResultWas::Unknown );
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Catch {
|
||||
}
|
||||
return AssertionResult( info, data );
|
||||
}
|
||||
std::string ExpressionResultBuilder::reconstructExpression( const AssertionInfo& info ) const {
|
||||
std::string ExpressionResultBuilder::reconstructExpression( AssertionInfo const& info ) const {
|
||||
if( m_exprComponents.op == "" )
|
||||
return m_exprComponents.lhs.empty() ? info.capturedExpression : m_exprComponents.op + m_exprComponents.lhs;
|
||||
else if( m_exprComponents.op == "matches" )
|
||||
|
||||
Reference in New Issue
Block a user