From 4cfc27e01ed57a1bb4d41e4fe4d52943a7e1b44b Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Thu, 29 Jul 2021 20:48:53 -0700 Subject: [PATCH] :bug: real max log size is 59 not 60 --- src/bank.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bank.cpp b/src/bank.cpp index dbd7602..df7312e 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -213,10 +213,10 @@ BankResponse Bank::PruneUsers(uint32_t threshold_bal) noexcept for (const auto &u : users) { #if RETURN_ON_DEL - if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &bal, &deleted_count](User &u) -> bool { + if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &bal, &deleted_count](User &u) { bal += u.balance; #else - if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &deleted_count](User &u) -> bool { + if (Bank::users.erase_if(u.first, [threshold_time, threshold_bal, &deleted_count](User &u) { #endif #if MAX_LOG_SIZE > 0 return ((!u.log.data.size() || u.log.data.back().time < threshold_time) && u.balance < threshold_bal);