🐛 std::forward changes and ChangePass return

This commit is contained in:
EntireTwix 2021-04-04 18:27:38 -07:00
parent 46c9eb7b7e
commit 56fe9d6152

View file

@ -25,7 +25,7 @@ public:
{
std::shared_lock<std::shared_mutex> lock{save_lock};
return users.try_emplace_l(
name, [](User &) {}, std::forward<std::string &&>(init_pass));
name, [](User &) {}, std::forward<std::string>(init_pass));
}
bool AdminAddUser(const std::string &attempt, std::string &&name, uint_fast32_t init_bal, std::string &&init_pass)
{
@ -34,7 +34,7 @@ public:
{
std::shared_lock<std::shared_mutex> lock{save_lock};
state = users.try_emplace_l(
name, [](User &) {}, init_bal, std::forward<std::string &&>(init_pass));
name, [](User &) {}, init_bal, std::forward<std::string>(init_pass));
}
return state;
}
@ -110,6 +110,7 @@ public:
u.password = new_pass;
}
});
return res;
}
void Save()
@ -153,7 +154,7 @@ public:
user_save.close();
for (const auto &u : temp.getMemberNames())
{
users.try_emplace(u, temp[u]["balance"].asUInt(), std::forward<std::string &&>(temp[u]["password"].asString()));
users.try_emplace(u, temp[u]["balance"].asUInt(), std::move(temp[u]["password"].asString()));
}
}
}