diff --git a/src/bank.cpp b/src/bank.cpp index 5615e1f..4556a2c 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -25,10 +25,17 @@ size_t Bank::NumOfUsers() const noexcept { return users.size(); } uint64_t Bank::NumOfLogs() const noexcept { uint64_t res = 0; -#if MAX_LOG_SIZE > 1 +#if MAX_LOG_SIZE > 0 for (const auto &u : users) { +#if MAX_LOG_SIZE == 1 + if (u.second.log.data.amount) + { + ++res; + } +#else res += u.second.log.data.size(); +#endif } #endif return res;