🐎 removed lambda args

This commit is contained in:
EntireTwix 2021-06-27 12:50:44 -07:00
parent b64e562235
commit dfdeba08bd

View file

@ -77,7 +77,7 @@ BankResponse Bank::SendFunds(const std::string &a_name, const std::string &b_nam
{ {
Transaction temp(a_name, b_name, amount); Transaction temp(a_name, b_name, amount);
std::shared_lock<std::shared_mutex> lock{send_funds_l}; std::shared_lock<std::shared_mutex> lock{send_funds_l};
users.modify_if(a_name, [this, &temp, &state, amount](User &a) { users.modify_if(a_name, [&temp, &state, amount](User &a) {
//if A can afford it //if A can afford it
if (a.balance < amount) if (a.balance < amount)
{ {
@ -92,7 +92,7 @@ BankResponse Bank::SendFunds(const std::string &a_name, const std::string &b_nam
}); });
if (state.first == k200OK) if (state.first == k200OK)
{ {
users.modify_if(b_name, [&a_name, &b_name, &temp, amount](User &b) { users.modify_if(b_name, [&temp, amount](User &b) {
b.balance += amount; b.balance += amount;
b.log.AddTrans(std::move(temp)); b.log.AddTrans(std::move(temp));
}); });