mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐛 Max log 1 optimizations fixed
This commit is contained in:
parent
99f35a11df
commit
46fcb1f443
1 changed files with 8 additions and 1 deletions
|
|
@ -25,10 +25,17 @@ size_t Bank::NumOfUsers() const noexcept { return users.size(); }
|
||||||
uint64_t Bank::NumOfLogs() const noexcept
|
uint64_t Bank::NumOfLogs() const noexcept
|
||||||
{
|
{
|
||||||
uint64_t res = 0;
|
uint64_t res = 0;
|
||||||
#if MAX_LOG_SIZE > 1
|
#if MAX_LOG_SIZE > 0
|
||||||
for (const auto &u : users)
|
for (const auto &u : users)
|
||||||
{
|
{
|
||||||
|
#if MAX_LOG_SIZE == 1
|
||||||
|
if (u.second.log.data.amount)
|
||||||
|
{
|
||||||
|
++res;
|
||||||
|
}
|
||||||
|
#else
|
||||||
res += u.second.log.data.size();
|
res += u.second.log.data.size();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue