mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐛 std::forward changes and ChangePass return
This commit is contained in:
parent
46c9eb7b7e
commit
56fe9d6152
1 changed files with 4 additions and 3 deletions
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue