Skip to content
Snippets Groups Projects
Commit 1277556c authored by Lioncash's avatar Lioncash
Browse files

profile_manager: Make array parameter to CreateNewUser a const reference

This doesn't modify the passed in array, so this can be a const
reference.
parent dfdf4a46
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ ResultCode ProfileManager::AddUser(ProfileInfo user) { ...@@ -62,7 +62,7 @@ ResultCode ProfileManager::AddUser(ProfileInfo user) {
/// Create a new user on the system. If the uuid of the user already exists, the user is not /// Create a new user on the system. If the uuid of the user already exists, the user is not
/// created. /// created.
ResultCode ProfileManager::CreateNewUser(UUID uuid, std::array<u8, 0x20>& username) { ResultCode ProfileManager::CreateNewUser(UUID uuid, const std::array<u8, 0x20>& username) {
if (user_count == MAX_USERS) { if (user_count == MAX_USERS) {
return ERROR_TOO_MANY_USERS; return ERROR_TOO_MANY_USERS;
} }
......
...@@ -79,7 +79,7 @@ class ProfileManager { ...@@ -79,7 +79,7 @@ class ProfileManager {
public: public:
ProfileManager(); // TODO(ogniK): Load from system save ProfileManager(); // TODO(ogniK): Load from system save
ResultCode AddUser(ProfileInfo user); ResultCode AddUser(ProfileInfo user);
ResultCode CreateNewUser(UUID uuid, std::array<u8, 0x20>& username); ResultCode CreateNewUser(UUID uuid, const std::array<u8, 0x20>& username);
ResultCode CreateNewUser(UUID uuid, const std::string& username); ResultCode CreateNewUser(UUID uuid, const std::string& username);
boost::optional<size_t> GetUserIndex(const UUID& uuid) const; boost::optional<size_t> GetUserIndex(const UUID& uuid) const;
boost::optional<size_t> GetUserIndex(ProfileInfo user) const; boost::optional<size_t> GetUserIndex(ProfileInfo user) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment