split UnloadAllLocalProfiles
This commit is contained in:
@@ -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 );
|
||||||
|
|||||||
@@ -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 );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user