split UnloadAllLocalProfiles

This commit is contained in:
Glenn Maynard
2005-08-11 23:06:01 +00:00
parent 89d1fae8ba
commit 01b6345758
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -318,11 +318,16 @@ CString ProfileManager::GetPlayerName( PlayerNumber pn ) const
} }
void ProfileManager::RefreshLocalProfilesFromDisk() void ProfileManager::UnloadAllLocalProfiles()
{ {
FOREACHM( CString, Profile*, g_mapLocalProfileIdToProfile, iter ) FOREACHM( CString, Profile*, g_mapLocalProfileIdToProfile, iter )
SAFE_DELETE( iter->second ); SAFE_DELETE( iter->second );
g_mapLocalProfileIdToProfile.clear(); g_mapLocalProfileIdToProfile.clear();
}
void ProfileManager::RefreshLocalProfilesFromDisk()
{
UnloadAllLocalProfiles();
vector<CString> vsProfileID; vector<CString> vsProfileID;
GetDirListing( USER_PROFILES_DIR "*", vsProfileID, true, false ); GetDirListing( USER_PROFILES_DIR "*", vsProfileID, true, false );
+1
View File
@@ -27,6 +27,7 @@ public:
void Init(); void Init();
// local profiles // local profiles
void UnloadAllLocalProfiles();
void RefreshLocalProfilesFromDisk(); void RefreshLocalProfilesFromDisk();
Profile &GetLocalProfile( const CString &sProfileID ); Profile &GetLocalProfile( const CString &sProfileID );