diff options
Diffstat (limited to '3rdparty/catch/include/internal/catch_xmlwriter.hpp')
-rw-r--r-- | 3rdparty/catch/include/internal/catch_xmlwriter.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdparty/catch/include/internal/catch_xmlwriter.hpp b/3rdparty/catch/include/internal/catch_xmlwriter.hpp index 97890d2f830..e5fe1775eab 100644 --- a/3rdparty/catch/include/internal/catch_xmlwriter.hpp +++ b/3rdparty/catch/include/internal/catch_xmlwriter.hpp @@ -57,7 +57,7 @@ namespace Catch { default: // Escape control chars - based on contribution by @espenalb in PR #465 and // by @mrpi PR #588 - if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) + if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>( c ) << ';'; else os << c; @@ -136,7 +136,7 @@ namespace Catch { XmlWriter& startElement( std::string const& name ) { ensureTagClosed(); newlineIfNecessary(); - stream() << m_indent << "<" << name; + stream() << m_indent << '<' << name; m_tags.push_back( name ); m_indent += " "; m_tagIsOpen = true; @@ -165,12 +165,12 @@ namespace Catch { XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ) { if( !name.empty() && !attribute.empty() ) - stream() << " " << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << "\""; + stream() << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; return *this; } XmlWriter& writeAttribute( std::string const& name, bool attribute ) { - stream() << " " << name << "=\"" << ( attribute ? "true" : "false" ) << "\""; + stream() << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; return *this; } @@ -202,7 +202,7 @@ namespace Catch { XmlWriter& writeBlankLine() { ensureTagClosed(); - stream() << "\n"; + stream() << '\n'; return *this; } @@ -227,7 +227,7 @@ namespace Catch { void newlineIfNecessary() { if( m_needsNewline ) { - stream() << "\n"; + stream() << '\n'; m_needsNewline = false; } } |