Simplify.
This commit is contained in:
@@ -554,12 +554,6 @@ const XNode *XNode::GetChild( const RString &sName ) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
XNode *XNode::AppendChild( const RString &sName, const RString &value ) { XNode *p = new XNode; p->m_sName = sName; p->m_sValue = value; return AppendChild( p ); }
|
||||
XNode *XNode::AppendChild( const RString &sName, float value ) { XNode *p = new XNode; p->m_sName = sName; p->SetValue( value ); return AppendChild( p ); }
|
||||
XNode *XNode::AppendChild( const RString &sName, int value ) { XNode *p = new XNode; p->m_sName = sName; p->SetValue( value ); return AppendChild( p ); }
|
||||
XNode *XNode::AppendChild( const RString &sName, unsigned value ) { XNode *p = new XNode; p->m_sName = sName; p->SetValue( value ); return AppendChild( p ); }
|
||||
XNode *XNode::AppendChild( const RString &sName, const DateTime &value ) { XNode *p = new XNode; p->m_sName = sName; p->SetValue( value ); return AppendChild( p ); }
|
||||
|
||||
XNode *XNode::AppendChild( XNode *node )
|
||||
{
|
||||
DEBUG_ASSERT( node->m_sName.size() );
|
||||
@@ -593,6 +587,7 @@ bool XNode::RemoveAttr( const RString &sName )
|
||||
|
||||
void XNode::AppendAttr( const RString &sName, const RString &sValue )
|
||||
{
|
||||
DEBUG_ASSERT( sName.size() );
|
||||
pair<XAttrs::iterator,bool> ret = m_attrs.insert( make_pair(sName,sValue) );
|
||||
if( !ret.second )
|
||||
ret.first->second = sValue; // already existed
|
||||
|
||||
Reference in New Issue
Block a user