diff options
| author | 2018-11-14 17:13:14 -0500 | |
|---|---|---|
| committer | 2018-11-14 17:13:17 -0500 | |
| commit | 9761936e02c710eb00247243d96d24c3f7a055ce (patch) | |
| tree | 9fe47dd4467123dec81f106e43801219eb0b96f7 /src | |
| parent | profile_manager: Move UUID Format function definitions into the cpp file (diff) | |
| download | yuzu-9761936e02c710eb00247243d96d24c3f7a055ce.tar.gz yuzu-9761936e02c710eb00247243d96d24c3f7a055ce.tar.xz yuzu-9761936e02c710eb00247243d96d24c3f7a055ce.zip | |
profile_manager: Replace iterative loop with a ranged-for loop in ParseUserSaveFile()
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 9 |
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(), |