From fc5c1cc295e583bf7e54b87161e1cabe1bd077d0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 11 Feb 2007 07:38:59 +0000 Subject: [PATCH] simplify --- stepmania/src/Bookkeeper.cpp | 6 ++---- stepmania/src/ExportStrings.cpp | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/stepmania/src/Bookkeeper.cpp b/stepmania/src/Bookkeeper.cpp index 113a554945..201e25cb9b 100644 --- a/stepmania/src/Bookkeeper.cpp +++ b/stepmania/src/Bookkeeper.cpp @@ -100,15 +100,13 @@ XNode* Bookkeeper::CreateNode() const for( map::const_iterator it = m_mapCoinsForHour.begin(); it != m_mapCoinsForHour.end(); ++it ) { - XNode *pDay = pData->AppendChild( "Coins" ); + int iCoins = it->second; + XNode *pDay = pData->AppendChild( "Coins", iCoins ); const Date &d = it->first; pDay->AppendAttr( "Hour", d.m_iHour ); pDay->AppendAttr( "Day", d.m_iDayOfYear ); pDay->AppendAttr( "Year", d.m_iYear ); - - int iCoins = it->second; - pDay->SetTextValue( iCoins ); } } diff --git a/stepmania/src/ExportStrings.cpp b/stepmania/src/ExportStrings.cpp index eea6d03b95..62b5ba719c 100644 --- a/stepmania/src/ExportStrings.cpp +++ b/stepmania/src/ExportStrings.cpp @@ -53,11 +53,8 @@ void ExportStrings::LuaInformation() pNode->AppendAttr( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" ); pNode->AppendAttr( "xsi:schemaLocation", "http://www.stepmania.com Lua.xsd" ); - XNode *pVersionNode = pNode->AppendChild( "Version" ); - pVersionNode->SetTextValue( PRODUCT_ID_VER ); - - XNode *pDateNode = pNode->AppendChild( "Date" ); - pDateNode->SetTextValue( DateTime::GetNowDate().GetString() ); + pNode->AppendChild( "Version", PRODUCT_ID_VER ); + pNode->AppendChild( "Date", DateTime::GetNowDate().GetString() ); XmlFileUtil::SaveToFile( pNode, "Lua.xml", "Lua.xsl" );