diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 08f48ba32a..0fcaacf28a 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -1109,7 +1109,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const int iNumPlays = iter->second; XNode *pStyleNode = s.CreateNode(); - pStyleNode->SetTextValue( iNumPlays ); + pStyleNode->AppendAttr(XNode::TEXT_ATTRIBUTE, iNumPlays ); pNumSongsPlayedByStyle->AppendChild( pStyleNode ); } diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index 44fa12e260..70938c953d 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -93,8 +93,6 @@ public: static const RString TEXT_ATTRIBUTE; template void GetTextValue( T &out ) const { GetAttrValue(TEXT_ATTRIBUTE, out); } - template - void SetTextValue( const T val ) { AppendAttr(TEXT_ATTRIBUTE, val); } // in own attribute list const XNodeValue *GetAttr( const RString &sAttrName ) const; @@ -112,7 +110,7 @@ public: // modify DOM template - XNode *AppendChild( const RString &sName, T value ) { XNode *p=new XNode(sName); p->SetTextValue(value); return AppendChild(p); } + XNode *AppendChild( const RString &sName, T value ) { XNode *p=AppendChild(sName); p->AppendAttr(XNode::TEXT_ATTRIBUTE, value); return p; } XNode *AppendChild( const RString &sName ) { XNode *p=new XNode(sName); return AppendChild(p); } XNode *AppendChild( XNode *node ); bool RemoveChild( XNode *node, bool bDelete = true ); diff --git a/stepmania/src/XmlFileUtil.cpp b/stepmania/src/XmlFileUtil.cpp index a03c56fcae..d3b7240b5e 100644 --- a/stepmania/src/XmlFileUtil.cpp +++ b/stepmania/src/XmlFileUtil.cpp @@ -312,7 +312,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns iOffset = iEnd; ReplaceEntityText( sValue, g_mapEntitiesToChars ); - pNode->SetTextValue( sValue ); + pNode->AppendAttr(XNode::TEXT_ATTRIBUTE, sValue ); } // generate child nodes @@ -394,7 +394,7 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns iOffset = iEnd; ReplaceEntityText( sValue, g_mapEntitiesToChars ); - pNode->SetTextValue( sValue ); + pNode->AppendAttr(XNode::TEXT_ATTRIBUTE, sValue ); } } }