mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
profile_manager: Replace iterative loop with a ranged-for loop in ParseUserSaveFile()
This commit is contained in:
parent
1af13e0802
commit
9761936e02
1 changed files with 5 additions and 4 deletions
|
@ -341,11 +341,12 @@ void ProfileManager::ParseUserSaveFile() {
|
|||
return;
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < MAX_USERS; ++i) {
|
||||
const auto& user = data.users[i];
|
||||
for (const auto& user : data.users) {
|
||||
if (user.uuid == UUID(INVALID_UUID)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (user.uuid != UUID(INVALID_UUID))
|
||||
AddUser({user.uuid, user.username, user.timestamp, {}, false});
|
||||
AddUser({user.uuid, user.username, user.timestamp, {}, false});
|
||||
}
|
||||
|
||||
std::stable_partition(profiles.begin(), profiles.end(),
|
||||
|
|
Loading…
Reference in a new issue