From 65007cf941defb2726539f82706ffedd88ba112b Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 1 Oct 2006 14:46:28 +0000 Subject: [PATCH] ctor that takes the name. --- stepmania/src/XmlFile.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index b822c77922..46069fa048 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -84,8 +84,8 @@ public: // modify DOM template - XNode *AppendChild( const RString &sName, T value ) { XNode *p=new XNode; p->m_sName=sName; p->SetValue(value); return AppendChild(p); } - XNode *AppendChild( const RString &sName ) { XNode *p=new XNode; p->m_sName=sName; return AppendChild(p); } + XNode *AppendChild( const RString &sName, T value ) { XNode *p=new XNode(sName); p->SetValue(value); return AppendChild(p); } + XNode *AppendChild( const RString &sName ) { XNode *p=new XNode(sName); return AppendChild(p); } XNode *AppendChild( XNode *node ); bool RemoveChild( XNode *node ); @@ -97,6 +97,7 @@ public: bool RemoveAttr( const RString &sName ); XNode() { } + explicit XNode( const RString &sName ) { m_sName = sName; } XNode( const XNode &cpy ); ~XNode();