Microopt: stream single char instead of single char string

This commit is contained in:
Martin Hořeňovský 2020-05-09 21:02:12 +02:00
parent b5a287f09f
commit eef6c9b79b
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 3 additions and 3 deletions

View File

@ -12,13 +12,13 @@
namespace Catch {
ITransientExpression::~ITransientExpression() = default;
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) {
if( lhs.size() + rhs.size() < 40 &&
lhs.find('\n') == std::string::npos &&
rhs.find('\n') == std::string::npos )
os << lhs << " " << op << " " << rhs;
os << lhs << ' ' << op << ' ' << rhs;
else
os << lhs << "\n" << op << "\n" << rhs;
os << lhs << '\n' << op << '\n' << rhs;
}
}