mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Microopt: stream single char instead of single char string
This commit is contained in:
parent
b5a287f09f
commit
eef6c9b79b
@ -12,13 +12,13 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
ITransientExpression::~ITransientExpression() = default;
|
ITransientExpression::~ITransientExpression() = default;
|
||||||
|
|
||||||
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
|
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
|
||||||
if( lhs.size() + rhs.size() < 40 &&
|
if( lhs.size() + rhs.size() < 40 &&
|
||||||
lhs.find('\n') == std::string::npos &&
|
lhs.find('\n') == std::string::npos &&
|
||||||
rhs.find('\n') == std::string::npos )
|
rhs.find('\n') == std::string::npos )
|
||||||
os << lhs << " " << op << " " << rhs;
|
os << lhs << ' ' << op << ' ' << rhs;
|
||||||
else
|
else
|
||||||
os << lhs << "\n" << op << "\n" << rhs;
|
os << lhs << '\n' << op << '\n' << rhs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user