No need for this to be split out.
This commit is contained in:
@@ -400,13 +400,6 @@ unsigned LoadInternal( XNode *pNode, const RString &xml, RString &sErrorOut, uns
|
|||||||
return iOffset;
|
return iOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetAttrXML( RageFileBasic &f, const RString &sName, const RString &sValue )
|
|
||||||
{
|
|
||||||
RString s(sValue);
|
|
||||||
ReplaceEntityText( s, g_mapCharsToEntities );
|
|
||||||
return f.Write( sName ) != -1 && f.Write( "='" ) != -1 && f.Write( s ) && f.Write( "' " ) != -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int &iTabBase )
|
bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int &iTabBase )
|
||||||
{
|
{
|
||||||
// tab
|
// tab
|
||||||
@@ -426,8 +419,12 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int
|
|||||||
if( f.Write(" ") == -1 )
|
if( f.Write(" ") == -1 )
|
||||||
return false;
|
return false;
|
||||||
FOREACH_CONST_Attr( pNode, p )
|
FOREACH_CONST_Attr( pNode, p )
|
||||||
if( !GetAttrXML(f, p->first, p->second->GetValue<RString>()) )
|
{
|
||||||
|
RString attr( p->second->GetValue<RString>() );
|
||||||
|
ReplaceEntityText( attr, g_mapCharsToEntities );
|
||||||
|
if( f.Write( p->first ) == -1 || f.Write( "='" ) == -1 || f.Write( attr ) || f.Write( "' " ) == -1 )
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( pNode->m_childs.empty() && pNode->m_pValue->GetValue<RString>().empty() )
|
if( pNode->m_childs.empty() && pNode->m_pValue->GetValue<RString>().empty() )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user