From 6d2fa387d8653df8d139d8a5e47a89d8d26ea3cd Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 4 Feb 2007 10:44:45 +0000 Subject: [PATCH] Cut xml writing time down by a third for catalog.xml by not concatenating strings before calling Write. --- stepmania/src/XmlFileUtil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/XmlFileUtil.cpp b/stepmania/src/XmlFileUtil.cpp index 9b1b7c1b15..f0548e08dc 100644 --- a/stepmania/src/XmlFileUtil.cpp +++ b/stepmania/src/XmlFileUtil.cpp @@ -404,7 +404,7 @@ bool GetAttrXML( RageFileBasic &f, const RString &sName, const RString &sValue ) { RString s(sValue); ReplaceEntityText( s, g_mapCharsToEntities ); - return f.Write(sName + "='" + s + "' ") != -1; + 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 ) @@ -418,7 +418,7 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int return false; // GetName()) == -1 ) + if( f.Write("<") == -1 || f.Write(pNode->GetName()) == -1 ) return false; // GetName() + ">") == -1 ) + if( f.Write("GetName()) == -1 || f.Write(">") == -1 ) return false; if( !pNode->m_childs.empty() )