diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index f025847176..762e79f54c 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -196,7 +196,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor * { FOREACH_CONST_Child( pNode, pChild ) { - if( pChild->m_sName == "Param" ) + if( pChild->GetName() == "Param" ) { RString sName; if( !pChild->GetAttrValue( "Name", sName ) ) @@ -220,7 +220,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor * // Element name is the type in XML. // Type= is the name in INI. // TODO: Remove the backward compat fallback - RString sClass = pNode->m_sName; + RString sClass = pNode->GetName(); bool bHasClass = pNode->GetAttrValue( "Class", sClass ); if( !bHasClass ) bHasClass = pNode->GetAttrValue( "Type", sClass ); // for backward compatibility @@ -316,9 +316,9 @@ static void MergeActorXML( XNode *pChild, const XNode *pParent ) ssprintf( "Overriding \"%s\" (\"%s\") in XML node \"%s\" with \"%s\" in XML node \"%s\"", p->first.c_str(), p->second.c_str(), - pChild->m_sName.c_str(), + pChild->GetName().c_str(), sOld.c_str(), - pParent->m_sName.c_str() ); + pParent->GetName().c_str() ); Dialog::OK( sWarning, "XML_ATTRIB_OVERRIDE" ); } pChild->AppendAttr( p->first, p->second ); diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 663701b45e..cb20db717b 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -181,7 +181,7 @@ void BackgroundImpl::Init() XNode xml; XmlFileUtil::LoadFromFileShowErrors(xml, sPath); - ASSERT( xml.m_sName == "BackgroundTransition" ); + ASSERT( xml.GetName() == "BackgroundTransition" ); BackgroundTransition &bgt = m_mapNameToTransition[sName]; RString sCmdLeaves; diff --git a/stepmania/src/BannerCache.cpp b/stepmania/src/BannerCache.cpp index d8cf79d48c..237c7ffdbe 100644 --- a/stepmania/src/BannerCache.cpp +++ b/stepmania/src/BannerCache.cpp @@ -70,7 +70,7 @@ void BannerCache::Demand() FOREACH_Child( &BannerData, p ) { - RString sBannerPath = p->m_sName; + RString sBannerPath = p->GetName(); if( g_BannerPathToImage.find(sBannerPath) != g_BannerPathToImage.end() ) continue; /* already loaded */ diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 20b6d67dfd..ba4e2ba095 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -113,7 +113,7 @@ void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode ) if( sFont == "" ) RageException::Throw( "An object \"%s\" in \"%s\" is missing the Font attribute.", - pNode->m_sName.c_str(), sDir.c_str() ); + pNode->GetName().c_str(), sDir.c_str() ); LoadFromFont( THEME->GetPathF( "", sFont ) ); SetText( sText, sAltText ); diff --git a/stepmania/src/Bookkeeper.cpp b/stepmania/src/Bookkeeper.cpp index 44b1f43743..af7210edcf 100644 --- a/stepmania/src/Bookkeeper.cpp +++ b/stepmania/src/Bookkeeper.cpp @@ -60,9 +60,9 @@ void Bookkeeper::Date::Set( tm pTime ) void Bookkeeper::LoadFromNode( const XNode *pNode ) { - if( pNode->m_sName != "Bookkeeping" ) + if( pNode->GetName() != "Bookkeeping" ) { - LOG->Warn( "Error loading bookkeeping: unexpected \"%s\"", pNode->m_sName.c_str() ); + LOG->Warn( "Error loading bookkeeping: unexpected \"%s\"", pNode->GetName().c_str() ); return; } diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index 0b4e5408f3..404ba5caa0 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -388,7 +388,7 @@ XNode* CourseID::CreateNode() const void CourseID::LoadFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "Course" ); + ASSERT( pNode->GetName() == "Course" ); pNode->GetAttrValue("Path", sPath); pNode->GetAttrValue("FullTitle", sFullTitle); } diff --git a/stepmania/src/HighScore.cpp b/stepmania/src/HighScore.cpp index 9202503348..447bad8682 100644 --- a/stepmania/src/HighScore.cpp +++ b/stepmania/src/HighScore.cpp @@ -108,7 +108,7 @@ XNode *HighScoreImpl::CreateNode() const void HighScoreImpl::LoadFromNode( const XNode *pNode ) { - ASSERT( pNode->m_sName == "HighScore" ); + ASSERT( pNode->GetName() == "HighScore" ); RString s; @@ -301,18 +301,18 @@ void HighScoreList::LoadFromNode( const XNode* pHighScoreList ) { Init(); - ASSERT( pHighScoreList->m_sName == "HighScoreList" ); + ASSERT( pHighScoreList->GetName() == "HighScoreList" ); FOREACH_CONST_Child( pHighScoreList, p ) { - if( p->m_sName == "NumTimesPlayed" ) + if( p->GetName() == "NumTimesPlayed" ) { p->GetValue( iNumTimesPlayed ); } - else if( p->m_sName == "LastPlayed" ) + else if( p->GetName() == "LastPlayed" ) { p->GetValue( dtLastPlayed ); } - else if( p->m_sName == "HighScore" ) + else if( p->GetName() == "HighScore" ) { vHighScores.resize( vHighScores.size()+1 ); vHighScores.back().LoadFromNode( p ); @@ -362,7 +362,7 @@ XNode* Screenshot::CreateNode() const void Screenshot::LoadFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "Screenshot" ); + ASSERT( pNode->GetName() == "Screenshot" ); pNode->GetChildValue( "FileName", sFileName ); pNode->GetChildValue( "MD5", sMD5 ); diff --git a/stepmania/src/IniFile.cpp b/stepmania/src/IniFile.cpp index 21c3fc74dc..5acc4b1478 100644 --- a/stepmania/src/IniFile.cpp +++ b/stepmania/src/IniFile.cpp @@ -89,7 +89,7 @@ bool IniFile::WriteFile( RageFileBasic &f ) const { FOREACH_CONST_Child( this, pKey ) { - if( f.PutLine( ssprintf("[%s]", pKey->m_sName.c_str()) ) == -1 ) + if( f.PutLine( ssprintf("[%s]", pKey->GetName().c_str()) ) == -1 ) { m_sError = f.GetError(); return false; diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 1a547810bb..4f7967e0e3 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -469,15 +469,15 @@ void PrefsManager::ReadGamePrefsFromIni( const RString &sIni ) FOREACH_CONST_Child( &ini, section ) { - if( !BeginsWith(section->m_sName, GAME_SECTION_PREFIX) ) + if( !BeginsWith(section->GetName(), GAME_SECTION_PREFIX) ) continue; - RString sGame = section->m_sName.Right( section->m_sName.length() - GAME_SECTION_PREFIX.length() ); + RString sGame = section->GetName().Right( section->GetName().length() - GAME_SECTION_PREFIX.length() ); GamePrefs &gp = m_mapGameNameToGamePrefs[ sGame ]; - ini.GetValue( section->m_sName, "Announcer", gp.m_sAnnouncer ); - ini.GetValue( section->m_sName, "Theme", gp.m_sTheme ); - ini.GetValue( section->m_sName, "DefaultModifiers", gp.m_sDefaultModifiers ); + ini.GetValue( section->GetName(), "Announcer", gp.m_sAnnouncer ); + ini.GetValue( section->GetName(), "Theme", gp.m_sTheme ); + ini.GetValue( section->GetName(), "DefaultModifiers", gp.m_sDefaultModifiers ); } } diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 06e9f74ed3..3723acfd00 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -856,12 +856,12 @@ ProfileLoadResult Profile::LoadStatsXmlFromNode( const XNode *xml, bool bIgnoreE { /* The placeholder stats.xml file has an tag. Don't load it, but don't * warn about it. */ - if( xml->m_sName == "html" ) + if( xml->GetName() == "html" ) return ProfileLoadResult_FailedNoProfile; - if( xml->m_sName != "Stats" ) + if( xml->GetName() != "Stats" ) { - WARN_M( xml->m_sName ); + WARN_M( xml->GetName() ); return ProfileLoadResult_FailedTampered; } @@ -1141,7 +1141,7 @@ ProfileLoadResult Profile::LoadEditableDataFromDir( RString sDir ) void Profile::LoadGeneralDataFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "GeneralData" ); + ASSERT( pNode->GetName() == "GeneralData" ); RString s; const XNode* pTemp; @@ -1183,7 +1183,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) { FOREACH_CONST_Child( pDefaultModifiers, game_type ) { - m_sDefaultModifiers[game_type->m_sName] = game_type->m_sValue; + m_sDefaultModifiers[game_type->GetName()] = game_type->GetValue(); } } } @@ -1214,7 +1214,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode ) { FOREACH_CONST_Child( pNumSongsPlayedByStyle, style ) { - if( style->m_sName != "Style" ) + if( style->GetName() != "Style" ) continue; StyleID s; @@ -1324,11 +1324,11 @@ void Profile::LoadSongScoresFromNode( const XNode* pSongScores ) { CHECKPOINT; - ASSERT( pSongScores->m_sName == "SongScores" ); + ASSERT( pSongScores->GetName() == "SongScores" ); FOREACH_CONST_Child( pSongScores, pSong ) { - if( pSong->m_sName != "Song" ) + if( pSong->GetName() != "Song" ) continue; SongID songID; @@ -1338,7 +1338,7 @@ void Profile::LoadSongScoresFromNode( const XNode* pSongScores ) FOREACH_CONST_Child( pSong, pSteps ) { - if( pSteps->m_sName != "Steps" ) + if( pSteps->GetName() != "Steps" ) continue; StepsID stepsID; @@ -1401,14 +1401,14 @@ void Profile::LoadCourseScoresFromNode( const XNode* pCourseScores ) { CHECKPOINT; - ASSERT( pCourseScores->m_sName == "CourseScores" ); + ASSERT( pCourseScores->GetName() == "CourseScores" ); vector vpAllCourses; SONGMAN->GetAllCourses( vpAllCourses, true ); FOREACH_CONST_Child( pCourseScores, pCourse ) { - if( pCourse->m_sName != "Course" ) + if( pCourse->GetName() != "Course" ) continue; CourseID courseID; @@ -1447,7 +1447,7 @@ void Profile::LoadCourseScoresFromNode( const XNode* pCourseScores ) FOREACH_CONST_Child( pCourse, pTrail ) { - if( pTrail->m_sName != "Trail" ) + if( pTrail->GetName() != "Trail" ) continue; TrailID trailID; @@ -1505,11 +1505,11 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores ) { CHECKPOINT; - ASSERT( pCategoryScores->m_sName == "CategoryScores" ); + ASSERT( pCategoryScores->GetName() == "CategoryScores" ); FOREACH_CONST_Child( pCategoryScores, pStepsType ) { - if( pStepsType->m_sName != "StepsType" ) + if( pStepsType->GetName() != "StepsType" ) continue; RString str; @@ -1521,7 +1521,7 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores ) FOREACH_CONST_Child( pStepsType, pRadarCategory ) { - if( pRadarCategory->m_sName != "RankingCategory" ) + if( pRadarCategory->GetName() != "RankingCategory" ) continue; if( !pRadarCategory->GetAttrValue( "Type", str ) ) @@ -1565,11 +1565,11 @@ void Profile::LoadScreenshotDataFromNode( const XNode* pScreenshotData ) { CHECKPOINT; - ASSERT( pScreenshotData->m_sName == "ScreenshotData" ); + ASSERT( pScreenshotData->GetName() == "ScreenshotData" ); FOREACH_CONST_Child( pScreenshotData, pScreenshot ) { - if( pScreenshot->m_sName != "Screenshot" ) - WARN_AND_CONTINUE_M( pScreenshot->m_sName ); + if( pScreenshot->GetName() != "Screenshot" ) + WARN_AND_CONTINUE_M( pScreenshot->GetName() ); Screenshot ss; ss.LoadFromNode( pScreenshot ); @@ -1599,11 +1599,11 @@ void Profile::LoadCalorieDataFromNode( const XNode* pCalorieData ) { CHECKPOINT; - ASSERT( pCalorieData->m_sName == "CalorieData" ); + ASSERT( pCalorieData->GetName() == "CalorieData" ); FOREACH_CONST_Child( pCalorieData, pCaloriesBurned ) { - if( pCaloriesBurned->m_sName != "CaloriesBurned" ) - WARN_AND_CONTINUE_M( pCaloriesBurned->m_sName ); + if( pCaloriesBurned->GetName() != "CaloriesBurned" ) + WARN_AND_CONTINUE_M( pCaloriesBurned->GetName() ); RString sDate; if( !pCaloriesBurned->GetAttrValue("Date",sDate) ) @@ -1664,7 +1664,7 @@ void Profile::HighScoreForASongAndSteps::LoadFromNode( const XNode* pNode ) { Unset(); - ASSERT( pNode->m_sName == "HighScoreForASongAndSteps" ); + ASSERT( pNode->GetName() == "HighScoreForASongAndSteps" ); const XNode* p; if( (p = pNode->GetChild("Song")) ) songID.LoadFromNode( p ); @@ -1678,10 +1678,10 @@ void Profile::LoadRecentSongScoresFromNode( const XNode* pRecentSongScores ) { CHECKPOINT; - ASSERT( pRecentSongScores->m_sName == "RecentSongScores" ); + ASSERT( pRecentSongScores->GetName() == "RecentSongScores" ); FOREACH_CONST_Child( pRecentSongScores, p ) { - if( p->m_sName == "HighScoreForASongAndSteps" ) + if( p->GetName() == "HighScoreForASongAndSteps" ) { HighScoreForASongAndSteps h; h.LoadFromNode( p ); @@ -1690,7 +1690,7 @@ void Profile::LoadRecentSongScoresFromNode( const XNode* pRecentSongScores ) } else { - WARN_AND_CONTINUE_M( p->m_sName ); + WARN_AND_CONTINUE_M( p->GetName() ); } } } @@ -1744,7 +1744,7 @@ void Profile::HighScoreForACourseAndTrail::LoadFromNode( const XNode* pNode ) { Unset(); - ASSERT( pNode->m_sName == "HighScoreForACourseAndTrail" ); + ASSERT( pNode->GetName() == "HighScoreForACourseAndTrail" ); const XNode* p; if( (p = pNode->GetChild("Course")) ) courseID.LoadFromNode( p ); @@ -1758,10 +1758,10 @@ void Profile::LoadRecentCourseScoresFromNode( const XNode* pRecentCourseScores ) { CHECKPOINT; - ASSERT( pRecentCourseScores->m_sName == "RecentCourseScores" ); + ASSERT( pRecentCourseScores->GetName() == "RecentCourseScores" ); FOREACH_CONST_Child( pRecentCourseScores, p ) { - if( p->m_sName == "HighScoreForACourseAndTrail" ) + if( p->GetName() == "HighScoreForACourseAndTrail" ) { HighScoreForACourseAndTrail h; h.LoadFromNode( p ); @@ -1770,7 +1770,7 @@ void Profile::LoadRecentCourseScoresFromNode( const XNode* pRecentCourseScores ) } else { - WARN_AND_CONTINUE_M( p->m_sName ); + WARN_AND_CONTINUE_M( p->GetName() ); } } } diff --git a/stepmania/src/RadarValues.cpp b/stepmania/src/RadarValues.cpp index c5040d6fd9..0b97aa7bde 100644 --- a/stepmania/src/RadarValues.cpp +++ b/stepmania/src/RadarValues.cpp @@ -49,7 +49,7 @@ XNode* RadarValues::CreateNode() const void RadarValues::LoadFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "RadarValues" ); + ASSERT( pNode->GetName() == "RadarValues" ); Zero(); diff --git a/stepmania/src/SongUtil.cpp b/stepmania/src/SongUtil.cpp index 0fd556a60f..c651106faf 100644 --- a/stepmania/src/SongUtil.cpp +++ b/stepmania/src/SongUtil.cpp @@ -848,7 +848,7 @@ XNode* SongID::CreateNode() const void SongID::LoadFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "Song" ); + ASSERT( pNode->GetName() == "Song" ); pNode->GetAttrValue("Dir", sDir); } diff --git a/stepmania/src/StepsUtil.cpp b/stepmania/src/StepsUtil.cpp index 4642a258b4..7bd53e03b3 100644 --- a/stepmania/src/StepsUtil.cpp +++ b/stepmania/src/StepsUtil.cpp @@ -281,7 +281,7 @@ void StepsID::ClearCache() void StepsID::LoadFromNode( const XNode* pNode ) { - ASSERT( pNode->m_sName == "Steps" ); + ASSERT( pNode->GetName() == "Steps" ); RString sTemp; diff --git a/stepmania/src/StyleUtil.cpp b/stepmania/src/StyleUtil.cpp index 2604e957be..17d344212a 100644 --- a/stepmania/src/StyleUtil.cpp +++ b/stepmania/src/StyleUtil.cpp @@ -42,7 +42,7 @@ XNode* StyleID::CreateNode() const void StyleID::LoadFromNode( const XNode* pNode ) { Unset(); - ASSERT( pNode->m_sName == "Style" ); + ASSERT( pNode->GetName() == "Style" ); sGame = ""; pNode->GetAttrValue("Game", sGame); diff --git a/stepmania/src/Workout.cpp b/stepmania/src/Workout.cpp index 67da2120e6..599a0ceb31 100644 --- a/stepmania/src/Workout.cpp +++ b/stepmania/src/Workout.cpp @@ -157,7 +157,7 @@ bool Workout::LoadFromFile( RString sFile ) { XNode xml; XmlFileUtil::LoadFromFileShowErrors( xml, sFile ); - if( xml.m_sName != "Workout" ) + if( xml.GetName() != "Workout" ) return false; m_sFile = sFile; @@ -187,8 +187,8 @@ bool Workout::LoadFromFile( RString sFile ) { FOREACH_CONST_Child( songGenres, songGenre ) { - if( songGenre->m_sName == "SongGenre" ) - m_vsSongGenres.push_back( songGenre->m_sValue ); + if( songGenre->GetName() == "SongGenre" ) + m_vsSongGenres.push_back( songGenre->GetValue() ); } } return true;