]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xml/xml.cpp
Fix various documentation warnings throughout core and base.
[wxWidgets.git] / src / xml / xml.cpp
index ee78a9aca4a2da3a414c55c61ae1645de6a1f2b8..665c4b906b4d7dc4d7a347b6bdcd78f12af2ddd6 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxXmlDocument - XML parser & data holder class
 // Author:      Vaclav Slavik
 // Created:     2000/03/05
-// RCS-ID:      $Id$
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -91,6 +90,22 @@ wxXmlNode::wxXmlNode(const wxXmlNode& node)
 }
 
 wxXmlNode::~wxXmlNode()
+{
+    DoFree();
+}
+
+wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
+{
+    if ( &node != this )
+    {
+        DoFree();
+        DoCopy(node);
+    }
+
+    return *this;
+}
+
+void wxXmlNode::DoFree()
 {
     wxXmlNode *c, *c2;
     for (c = m_children; c; c = c2)
@@ -107,14 +122,6 @@ wxXmlNode::~wxXmlNode()
     }
 }
 
-wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
-{
-    wxDELETE(m_attrs);
-    wxDELETE(m_children);
-    DoCopy(node);
-    return *this;
-}
-
 void wxXmlNode::DoCopy(const wxXmlNode& node)
 {
     m_type = node.m_type;