summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/profile_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-03 15:03:39 +0200
committerLioncash <mathew1800@gmail.com>2020-08-03 15:03:42 +0200
commitb9831fd80afb3cf707d1b0fe2b1d7288adc4605a (patch)
tree013b7b7665e86c414ceb28550fdeefefcc9f05be /src/core/hle/service/acc/profile_manager.cpp
parentprofile_manager: Make use of designated initializers (diff)
downloadyuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar.gz
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar.bz2
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar.lz
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar.xz
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.tar.zst
yuzu-b9831fd80afb3cf707d1b0fe2b1d7288adc4605a.zip
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() {
/// internal management of the users profiles
std::optional<std::size_t> ProfileManager::AddToProfiles(const ProfileInfo& profile) {
if (user_count >= MAX_USERS) {
- return {};
+ return std::nullopt;
}
profiles[user_count] = profile;
return user_count++;
@@ -127,7 +127,7 @@ ResultCode ProfileManager::CreateNewUser(UUID uuid, const std::string& username)
std::optional<UUID> ProfileManager::GetUser(std::size_t index) const {
if (index >= MAX_USERS) {
- return {};
+ return std::nullopt;
}
return profiles[index].user_uuid;
@@ -136,13 +136,13 @@ std::optional<UUID> ProfileManager::GetUser(std::size_t index) const {
/// Returns a users profile index based on their user id.
std::optional<std::size_t> ProfileManager::GetUserIndex(const UUID& uuid) const {
if (!uuid) {
- return {};
+ return std::nullopt;
}
const auto iter = std::find_if(profiles.begin(), profiles.end(),
[&uuid](const ProfileInfo& p) { return p.user_uuid == uuid; });
if (iter == profiles.end()) {
- return {};
+ return std::nullopt;
}
return static_cast<std::size_t>(std::distance(profiles.begin(), iter));