remove parent pointers
This commit is contained in:
@@ -210,7 +210,6 @@ char* XNode::LoadAttributes( const char* pszAttrs , PARSEINFO *pi /*= &piDefault
|
|||||||
}
|
}
|
||||||
|
|
||||||
XAttr *attr = new XAttr;
|
XAttr *attr = new XAttr;
|
||||||
attr->parent = this;
|
|
||||||
|
|
||||||
// XML Attr Name
|
// XML Attr Name
|
||||||
SetString( xml, pEnd, &attr->name );
|
SetString( xml, pEnd, &attr->name );
|
||||||
@@ -370,7 +369,6 @@ char* XNode::Load( const char* pszXml, PARSEINFO *pi /*= &piDefault*/ )
|
|||||||
while( xml && *xml )
|
while( xml && *xml )
|
||||||
{
|
{
|
||||||
XNode *node = new XNode;
|
XNode *node = new XNode;
|
||||||
node->parent = this;
|
|
||||||
|
|
||||||
xml = node->Load( xml,pi );
|
xml = node->Load( xml,pi );
|
||||||
if( !node->name.empty() )
|
if( !node->name.empty() )
|
||||||
@@ -861,7 +859,6 @@ XNode *XNode::AppendChild( const char* name, const DateTime &value ) { XNode *p
|
|||||||
//========================================================
|
//========================================================
|
||||||
XNode *XNode::AppendChild( XNode *node )
|
XNode *XNode::AppendChild( XNode *node )
|
||||||
{
|
{
|
||||||
node->parent = this;
|
|
||||||
childs.push_back( node );
|
childs.push_back( node );
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
@@ -934,7 +931,6 @@ XAttrs::iterator XNode::GetAttrIterator( XAttr *attr )
|
|||||||
//========================================================
|
//========================================================
|
||||||
XAttr *XNode::AppendAttr( XAttr *attr )
|
XAttr *XNode::AppendAttr( XAttr *attr )
|
||||||
{
|
{
|
||||||
attr->parent = this;
|
|
||||||
attrs.push_back( attr );
|
attrs.push_back( attr );
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,8 +115,6 @@ struct XAttr
|
|||||||
void GetValue(unsigned &out) const;
|
void GetValue(unsigned &out) const;
|
||||||
void GetValue(DateTime &out) const;
|
void GetValue(DateTime &out) const;
|
||||||
|
|
||||||
XNode* parent;
|
|
||||||
|
|
||||||
bool GetXML( RageFileBasic &f, DISP_OPT *opt = &optDefault );
|
bool GetXML( RageFileBasic &f, DISP_OPT *opt = &optDefault );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,7 +137,6 @@ struct XNode
|
|||||||
void SetValue(const DateTime &v);
|
void SetValue(const DateTime &v);
|
||||||
|
|
||||||
// internal variables
|
// internal variables
|
||||||
XNode *parent; // parent node
|
|
||||||
XNodes childs; // child node
|
XNodes childs; // child node
|
||||||
XAttrs attrs; // attributes
|
XAttrs attrs; // attributes
|
||||||
|
|
||||||
@@ -207,7 +204,7 @@ struct XNode
|
|||||||
bool RemoveAttr( XAttr *attr );
|
bool RemoveAttr( XAttr *attr );
|
||||||
XAttr *DetachAttr( XAttr *attr );
|
XAttr *DetachAttr( XAttr *attr );
|
||||||
|
|
||||||
XNode() { parent = NULL; }
|
XNode() { }
|
||||||
~XNode();
|
~XNode();
|
||||||
|
|
||||||
void Close();
|
void Close();
|
||||||
|
|||||||
Reference in New Issue
Block a user