From f9a26d468c2388269eb63c3baf6c35762c594932 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 20 Aug 2018 17:36:41 -0400 Subject: profile_manager: Take ProfileInfo by const reference where applicable ProfileInfo is quite a large struct in terms of data, and we don't need to perform a copy in these instances, so we can just pass constant references instead. --- src/core/hle/service/acc/profile_manager.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/acc/profile_manager.h') diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 49dc3a6e3..d38f67188 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -78,19 +78,19 @@ static_assert(sizeof(ProfileBase) == 0x38, "ProfileBase is an invalid size"); class ProfileManager { public: ProfileManager(); // TODO(ogniK): Load from system save - ResultCode AddUser(ProfileInfo user); + ResultCode AddUser(const ProfileInfo& user); ResultCode CreateNewUser(UUID uuid, const std::array& username); ResultCode CreateNewUser(UUID uuid, const std::string& username); boost::optional GetUserIndex(const UUID& uuid) const; - boost::optional GetUserIndex(ProfileInfo user) const; + boost::optional GetUserIndex(const ProfileInfo& user) const; bool GetProfileBase(boost::optional index, ProfileBase& profile) const; bool GetProfileBase(UUID uuid, ProfileBase& profile) const; - bool GetProfileBase(ProfileInfo user, ProfileBase& profile) const; + bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; bool GetProfileBaseAndData(boost::optional index, ProfileBase& profile, std::array& data) const; bool GetProfileBaseAndData(UUID uuid, ProfileBase& profile, std::array& data) const; - bool GetProfileBaseAndData(ProfileInfo user, ProfileBase& profile, + bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, std::array& data) const; size_t GetUserCount() const; size_t GetOpenUserCount() const; -- cgit v1.2.3