From 34ced37a71d10bfe2db96ec56517b36e9beeff3c Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 21 Apr 2021 23:21:50 -0700 Subject: [PATCH] :bug: fixed sendfunds log --- include/bank.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/bank.hpp b/include/bank.hpp index 0cb9d9f..8fced20 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -126,9 +126,9 @@ public: { //if user lacks a log, one is created, this is to reduce usage Transaction temp(a_name, b_name, amount); - Transaction temp2(a_name, b_name, amount); + Transaction temp2 = temp; // to keep same time - users.if_contains(a_name, [&temp, &a_name](const User &u) { + users.if_contains(a_name, [this, &temp, &a_name](const User &u) { if (logs.try_emplace_l(a_name, [&temp](Log &l) { l.AddTrans(std::move(temp)); })) { logs.modify_if(a_name, [&temp](Log &l) { @@ -136,7 +136,7 @@ public: }); } }); - users.if_contains(a_name, [&temp, &a_name](const User &u) { + users.if_contains(a_name, [this, &temp2, &b_name](const User &u) { if (logs.try_emplace_l(b_name, [&temp2](Log &l) { l.AddTrans(std::move(temp2)); })) { logs.modify_if(b_name, [&temp2](Log &l) {