summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index 3867ca29a..a98d57b5c 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -58,7 +58,7 @@ ProfileManager::~ProfileManager() {
58/// internal management of the users profiles 58/// internal management of the users profiles
59std::optional<std::size_t> ProfileManager::AddToProfiles(const ProfileInfo& profile) { 59std::optional<std::size_t> ProfileManager::AddToProfiles(const ProfileInfo& profile) {
60 if (user_count >= MAX_USERS) { 60 if (user_count >= MAX_USERS) {
61 return {}; 61 return std::nullopt;
62 } 62 }
63 profiles[user_count] = profile; 63 profiles[user_count] = profile;
64 return user_count++; 64 return user_count++;
@@ -127,7 +127,7 @@ ResultCode ProfileManager::CreateNewUser(UUID uuid, const std::string& username)
127 127
128std::optional<UUID> ProfileManager::GetUser(std::size_t index) const { 128std::optional<UUID> ProfileManager::GetUser(std::size_t index) const {
129 if (index >= MAX_USERS) { 129 if (index >= MAX_USERS) {
130 return {}; 130 return std::nullopt;
131 } 131 }
132 132
133 return profiles[index].user_uuid; 133 return profiles[index].user_uuid;
@@ -136,13 +136,13 @@ std::optional<UUID> ProfileManager::GetUser(std::size_t index) const {
136/// Returns a users profile index based on their user id. 136/// Returns a users profile index based on their user id.
137std::optional<std::size_t> ProfileManager::GetUserIndex(const UUID& uuid) const { 137std::optional<std::size_t> ProfileManager::GetUserIndex(const UUID& uuid) const {
138 if (!uuid) { 138 if (!uuid) {
139 return {}; 139 return std::nullopt;
140 } 140 }
141 141
142 const auto iter = std::find_if(profiles.begin(), profiles.end(), 142 const auto iter = std::find_if(profiles.begin(), profiles.end(),
143 [&uuid](const ProfileInfo& p) { return p.user_uuid == uuid; }); 143 [&uuid](const ProfileInfo& p) { return p.user_uuid == uuid; });
144 if (iter == profiles.end()) { 144 if (iter == profiles.end()) {
145 return {}; 145 return std::nullopt;
146 } 146 }
147 147
148 return static_cast<std::size_t>(std::distance(profiles.begin(), iter)); 148 return static_cast<std::size_t>(std::distance(profiles.begin(), iter));