From 8634c997850baab76c7eba79c43836b9ba16513c Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 21 Apr 2021 19:25:47 -0700 Subject: [PATCH] :racehorse: avoiding one branch --- include/bank.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bank.hpp b/include/bank.hpp index c86bfa6..ba1e845 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -117,7 +117,7 @@ public: users.modify_if(a_name, [amount](User &a) { a.balance += amount; }); - state = false; //because had to refund transaction + return false; //because had to refund transaction } } }