profile_manager: Remove unnecessary std::move in AddToProfiles() and CreateNewUser()

Moving a const reference isn't possible, so this just results in a copy
(and given ProfileInfo is composed of trivial types and aggregates, a
move wouldn't really do anything).
This commit is contained in:
Lioncash 2018-08-20 17:16:23 -04:00
parent 028d90eb79
commit 9e9a4bb3a7

View File

@ -25,7 +25,7 @@ boost::optional<size_t> ProfileManager::AddToProfiles(const ProfileInfo& user) {
if (user_count >= MAX_USERS) { if (user_count >= MAX_USERS) {
return boost::none; return boost::none;
} }
profiles[user_count] = std::move(user); profiles[user_count] = user;
return user_count++; return user_count++;
} }
@ -67,7 +67,7 @@ ResultCode ProfileManager::CreateNewUser(UUID uuid, std::array<u8, 0x20>& userna
return ERROR_USER_ALREADY_EXISTS; return ERROR_USER_ALREADY_EXISTS;
} }
ProfileInfo profile; ProfileInfo profile;
profile.user_uuid = std::move(uuid); profile.user_uuid = uuid;
profile.username = username; profile.username = username;
profile.data = {}; profile.data = {};
profile.creation_time = 0x0; profile.creation_time = 0x0;