mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-23 04:57:09 +11:00
🐛 fixed last commit
This commit is contained in:
parent
9212edb9a3
commit
1df473f49a
1 changed files with 4 additions and 6 deletions
10
src/bank.cpp
10
src/bank.cpp
|
|
@ -245,10 +245,9 @@ BankResponse Bank::DelUser(const std::string &name) noexcept
|
||||||
if (users.if_contains(name, [&bal](const User &u) { bal = u.balance; }) &&
|
if (users.if_contains(name, [&bal](const User &u) { bal = u.balance; }) &&
|
||||||
bal)
|
bal)
|
||||||
{
|
{
|
||||||
users.modify_if(return_account, [bal](User & u))
|
users.modify_if(return_account, [bal](User &u) {
|
||||||
{
|
|
||||||
u.balance += bal;
|
u.balance += bal;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
std::shared_lock<std::shared_mutex> lock{iter_lock};
|
std::shared_lock<std::shared_mutex> lock{iter_lock};
|
||||||
|
|
@ -276,10 +275,9 @@ void Bank::DelSelf(const std::string &name) noexcept
|
||||||
if (users.if_contains(name, [&bal](const User &u) { bal = u.balance; }) &&
|
if (users.if_contains(name, [&bal](const User &u) { bal = u.balance; }) &&
|
||||||
bal)
|
bal)
|
||||||
{
|
{
|
||||||
users.modify_if(return_account, [bal](User & u))
|
users.modify_if(return_account, [bal](User &u) {
|
||||||
{
|
|
||||||
u.balance += bal;
|
u.balance += bal;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if CONSERVATIVE_DISK_SAVE
|
#if CONSERVATIVE_DISK_SAVE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue