From f4caf2275fbae2e6efa99448d50302821457aa80 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 11 Aug 2005 23:57:20 +0000 Subject: [PATCH] simplify --- stepmania/src/ProfileManager.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 80259085c3..cdbe7aa4ac 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -163,7 +163,6 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn ) vector asDirsToTry; GetMemoryCardProfileDirectoriesToTry( asDirsToTry ); - int iLoadedFrom = -1; for( unsigned i = 0; i < asDirsToTry.size(); ++i ) { const CString &sSubdir = asDirsToTry[i]; @@ -180,7 +179,9 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn ) Profile::LoadResult res = (Profile::LoadResult) LoadProfile( pn, sDir, true ); if( res == Profile::success ) { - iLoadedFrom = i; + /* If importing, store the directory we imported from, for display purposes. */ + if( i > 0 ) + m_sProfileDirImportedFrom[pn] = asDirsToTry[i]; break; } @@ -188,12 +189,6 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn ) break; } - /* Store the directory we imported from, for display purposes. */ - if( iLoadedFrom > 0 ) - { - m_sProfileDirImportedFrom[pn] = asDirsToTry[iLoadedFrom]; - } - /* If we imported a profile fallback directory, change the memory card * directory back to the preferred directory: never write over imported * scores. */