mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-23 21:15:39 +02:00
Address results of PVS-Studio static analysis
Couple are left un-addressed, see #958 for details.
This commit is contained in:
@@ -65,10 +65,19 @@ namespace Catch {
|
||||
: m_writer( writer )
|
||||
{}
|
||||
|
||||
XmlWriter::ScopedElement::ScopedElement( ScopedElement const& other )
|
||||
XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other )
|
||||
: m_writer( other.m_writer ){
|
||||
other.m_writer = nullptr;
|
||||
}
|
||||
XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) {
|
||||
if ( m_writer ) {
|
||||
m_writer->endElement();
|
||||
}
|
||||
m_writer = other.m_writer;
|
||||
other.m_writer = nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
XmlWriter::ScopedElement::~ScopedElement() {
|
||||
if( m_writer )
|
||||
|
Reference in New Issue
Block a user