From cef0c4cebb80b22a8338da230550eb0402bbde9c Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 4 Mar 2006 10:24:50 +0000 Subject: [PATCH] Const. --- stepmania/src/ProfileManager.cpp | 10 +++++----- stepmania/src/ProfileManager.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index c34a160cc7..bdbec0e814 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -35,9 +35,9 @@ static void DefaultLocalProfileIDInit( size_t /*PlayerNumber*/ i, RString &sName Preference1D ProfileManager::m_sDefaultLocalProfileID( DefaultLocalProfileIDInit, NUM_PLAYERS ); -#define NEW_MEM_CARD_NAME "" -#define USER_PROFILES_DIR "/Save/LocalProfiles/" -#define MACHINE_PROFILE_DIR "/Save/MachineProfile/" +const RString NEW_MEM_CARD_NAME = ""; +const RString USER_PROFILES_DIR = "/Save/LocalProfiles/"; +const RString MACHINE_PROFILE_DIR = "/Save/MachineProfile/"; const RString LAST_GOOD_SUBDIR = "LastGood/"; @@ -383,7 +383,7 @@ void ProfileManager::RefreshLocalProfilesFromDisk() UnloadAllLocalProfiles(); vector vsProfileID; - GetDirListing( USER_PROFILES_DIR "*", vsProfileID, true, true ); + GetDirListing( USER_PROFILES_DIR + "*", vsProfileID, true, true ); FOREACH_CONST( RString, vsProfileID, p ) { g_vLocalProfile.push_back( DirAndProfile() ); @@ -540,7 +540,7 @@ bool ProfileManager::LastLoadWasFromLastGood( PlayerNumber pn ) const return !m_sProfileDir[pn].empty() && m_bLastLoadWasFromLastGood[pn]; } -RString ProfileManager::GetProfileDir( ProfileSlot slot ) const +const RString& ProfileManager::GetProfileDir( ProfileSlot slot ) const { switch( slot ) { diff --git a/stepmania/src/ProfileManager.h b/stepmania/src/ProfileManager.h index 681d72c9aa..3336b8e3c7 100644 --- a/stepmania/src/ProfileManager.h +++ b/stepmania/src/ProfileManager.h @@ -76,7 +76,7 @@ public: const Profile* GetProfile( ProfileSlot slot ) const; Profile* GetProfile( ProfileSlot slot ) { return (Profile*) ((const ProfileManager *) this)->GetProfile(slot); } - RString GetProfileDir( ProfileSlot slot ) const; + const RString& GetProfileDir( ProfileSlot slot ) const; RString GetProfileDirImportedFrom( ProfileSlot slot ) const; Profile* GetMachineProfile() { return m_pMachineProfile; }