summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-14 17:13:14 -0500
committerGravatar Lioncash2018-11-14 17:13:17 -0500
commit9761936e02c710eb00247243d96d24c3f7a055ce (patch)
tree9fe47dd4467123dec81f106e43801219eb0b96f7
parentprofile_manager: Move UUID Format function definitions into the cpp file (diff)
downloadyuzu-9761936e02c710eb00247243d96d24c3f7a055ce.tar.gz
yuzu-9761936e02c710eb00247243d96d24c3f7a055ce.tar.xz
yuzu-9761936e02c710eb00247243d96d24c3f7a055ce.zip
profile_manager: Replace iterative loop with a ranged-for loop in ParseUserSaveFile()
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index b66720415..968263846 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -341,11 +341,12 @@ void ProfileManager::ParseUserSaveFile() {
341 return; 341 return;
342 } 342 }
343 343
344 for (std::size_t i = 0; i < MAX_USERS; ++i) { 344 for (const auto& user : data.users) {
345 const auto& user = data.users[i]; 345 if (user.uuid == UUID(INVALID_UUID)) {
346 continue;
347 }
346 348
347 if (user.uuid != UUID(INVALID_UUID)) 349 AddUser({user.uuid, user.username, user.timestamp, {}, false});
348 AddUser({user.uuid, user.username, user.timestamp, {}, false});
349 } 350 }
350 351
351 std::stable_partition(profiles.begin(), profiles.end(), 352 std::stable_partition(profiles.begin(), profiles.end(),