remove SetTextValue
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -93,8 +93,6 @@ public:
|
||||
static const RString TEXT_ATTRIBUTE;
|
||||
template <typename T>
|
||||
void GetTextValue( T &out ) const { GetAttrValue(TEXT_ATTRIBUTE, out); }
|
||||
template <typename T>
|
||||
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 <typename T>
|
||||
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 );
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user