mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Use StringRef instead of std::string in XmlWriter::ScopedElement
This commit is contained in:
parent
c7241bb76e
commit
d9f72868b2
@ -211,7 +211,8 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, XmlFormatting fmt ) {
|
||||
XmlWriter::ScopedElement&
|
||||
XmlWriter::ScopedElement::writeText( StringRef text, XmlFormatting fmt ) {
|
||||
m_writer->writeText( text, fmt );
|
||||
return *this;
|
||||
}
|
||||
|
@ -56,10 +56,14 @@ namespace Catch {
|
||||
|
||||
~ScopedElement();
|
||||
|
||||
ScopedElement& writeText( std::string const& text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent );
|
||||
ScopedElement&
|
||||
writeText( StringRef text,
|
||||
XmlFormatting fmt = XmlFormatting::Newline |
|
||||
XmlFormatting::Indent );
|
||||
|
||||
template<typename T>
|
||||
ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {
|
||||
ScopedElement& writeAttribute( StringRef name,
|
||||
T const& attribute ) {
|
||||
m_writer->writeAttribute( name, attribute );
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user