mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 16:12:14 +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; }) &&
|
||||
bal)
|
||||
{
|
||||
users.modify_if(return_account, [bal](User & u))
|
||||
{
|
||||
users.modify_if(return_account, [bal](User &u) {
|
||||
u.balance += bal;
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
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; }) &&
|
||||
bal)
|
||||
{
|
||||
users.modify_if(return_account, [bal](User & u))
|
||||
{
|
||||
users.modify_if(return_account, [bal](User &u) {
|
||||
u.balance += bal;
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#if CONSERVATIVE_DISK_SAVE
|
||||
|
|
|
|||
Loading…
Reference in a new issue