diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index c105f52d82..1f2149f7ce 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -35,11 +35,6 @@ XNode::XNode( const XNode &cpy ): this->AppendChild( new XNode(*c) ); } -XNode::~XNode() -{ - Free(); -} - void XNode::Clear() { Free(); @@ -49,9 +44,9 @@ void XNode::Clear() void XNode::Free() { FOREACH_Child( this, p ) - SAFE_DELETE( p ); + delete p; FOREACH_Attr( this, pAttr ) - SAFE_DELETE( pAttr->second ); + delete pAttr->second; m_childs.clear(); m_attrs.clear(); diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index 3481f0606c..f9f477183b 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -129,7 +129,7 @@ public: XNode(); explicit XNode( const RString &sName ); XNode( const XNode &cpy ); - ~XNode(); + ~XNode() { Free(); } void Clear();