remove parent pointers

This commit is contained in:
Chris Danford
2005-01-07 06:51:53 +00:00
parent 8d4dcfb209
commit b1070d2077
2 changed files with 1 additions and 8 deletions
-4
View File
@@ -210,7 +210,6 @@ char* XNode::LoadAttributes( const char* pszAttrs , PARSEINFO *pi /*= &piDefault
}
XAttr *attr = new XAttr;
attr->parent = this;
// XML Attr Name
SetString( xml, pEnd, &attr->name );
@@ -370,7 +369,6 @@ char* XNode::Load( const char* pszXml, PARSEINFO *pi /*= &piDefault*/ )
while( xml && *xml )
{
XNode *node = new XNode;
node->parent = this;
xml = node->Load( xml,pi );
if( !node->name.empty() )
@@ -861,7 +859,6 @@ XNode *XNode::AppendChild( const char* name, const DateTime &value ) { XNode *p
//========================================================
XNode *XNode::AppendChild( XNode *node )
{
node->parent = this;
childs.push_back( node );
return node;
}
@@ -934,7 +931,6 @@ XAttrs::iterator XNode::GetAttrIterator( XAttr *attr )
//========================================================
XAttr *XNode::AppendAttr( XAttr *attr )
{
attr->parent = this;
attrs.push_back( attr );
return attr;
}
+1 -4
View File
@@ -115,8 +115,6 @@ struct XAttr
void GetValue(unsigned &out) const;
void GetValue(DateTime &out) const;
XNode* parent;
bool GetXML( RageFileBasic &f, DISP_OPT *opt = &optDefault );
};
@@ -139,7 +137,6 @@ struct XNode
void SetValue(const DateTime &v);
// internal variables
XNode *parent; // parent node
XNodes childs; // child node
XAttrs attrs; // attributes
@@ -207,7 +204,7 @@ struct XNode
bool RemoveAttr( XAttr *attr );
XAttr *DetachAttr( XAttr *attr );
XNode() { parent = NULL; }
XNode() { }
~XNode();
void Close();