Use char literal instead of string literal with 1 char

In reality, this is a relatively small performance improvement,
especially with the previous improvements removing lots of superfluous
string handling, but still was measurable.
This commit is contained in:
Martin Hořeňovský
2017-01-29 23:07:15 +01:00
parent efab3ca8b2
commit bcaa2f9646
13 changed files with 72 additions and 72 deletions

View File

@@ -146,7 +146,7 @@ namespace Catch {
SectionNode const& sectionNode ) {
std::string name = trim( sectionNode.stats.sectionInfo.name );
if( !rootName.empty() )
name = rootName + "/" + name;
name = rootName + '/' + name;
if( !sectionNode.assertions.empty() ||
!sectionNode.stdOut.empty() ||
@@ -224,14 +224,14 @@ namespace Catch {
std::ostringstream oss;
if( !result.getMessage().empty() )
oss << result.getMessage() << "\n";
oss << result.getMessage() << '\n';
for( std::vector<MessageInfo>::const_iterator
it = stats.infoMessages.begin(),
itEnd = stats.infoMessages.end();
it != itEnd;
++it )
if( it->type == ResultWas::Info )
oss << it->message << "\n";
oss << it->message << '\n';
oss << "at " << result.getSourceInfo();
xml.writeText( oss.str(), false );