From a3d93b5831bce07c957278f9d51b8172b06b5a07 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 21 Apr 2021 23:25:16 -0700 Subject: [PATCH] :racehorse: reduced time vars size --- include/bank.hpp | 4 ++-- include/log.hpp | 4 ++-- include/transactions.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/bank.hpp b/include/bank.hpp index 8fced20..a739367 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -214,7 +214,7 @@ public: uint32_t j; for (uint32_t i = l.data.size() - 1; i > 0; --i) { - j = 99 - i; + j = 24 - i; if (!l.data[i].amount) { return; @@ -222,7 +222,7 @@ public: res[j]["to"] = l.data[i].to; res[j]["from"] = l.data[i].from; res[j]["amount"] = l.data[i].amount; - res[j]["time"] = (Json::UInt64)l.data[i].time; + res[j]["time"] = (Json::UInt)l.data[i].time; } }))) { diff --git a/include/log.hpp b/include/log.hpp index 9c83e53..dfb0eed 100644 --- a/include/log.hpp +++ b/include/log.hpp @@ -5,10 +5,10 @@ struct Log { - std::array data; + std::array data; void AddTrans(Transaction &&v) { std::rotate(data.begin(), data.begin() + 1, data.end()); - data[99] = std::move(v); + data[24] = std::move(v); } }; diff --git a/include/transactions.hpp b/include/transactions.hpp index b56648e..98ef3fb 100644 --- a/include/transactions.hpp +++ b/include/transactions.hpp @@ -8,7 +8,7 @@ struct Transaction std::string from = "", to = ""; uint32_t amount = 0; - uint64_t time = 0; + uint32_t time = 0; void Concatinate(std::string &s) {