🐎 made noexcept

This commit is contained in:
EntireTwix 2021-07-01 23:29:57 -07:00
parent d93786f4ff
commit 3e0efa780b
2 changed files with 5 additions and 5 deletions

View file

@ -13,9 +13,9 @@ private:
Json::Value log_snapshot;
public:
const Json::Value &GetLog();
std::vector<Transaction> data;
void AddTrans(Transaction &&t);
const Json::Value &GetLog() noexcept;
void AddTrans(Transaction &&t) noexcept;
Json::Value Serialize() const; // to be removed later
};

View file

@ -1,6 +1,6 @@
#include "log.h"
void Log::AddTrans(Transaction &&t)
void Log::AddTrans(Transaction &&t) noexcept
{
if (data.size() == MAX_LOG_SIZE) // If we hit the max size
{
@ -19,7 +19,7 @@ void Log::AddTrans(Transaction &&t)
log_flag.SetChangesOn();
}
const Json::Value &Log::GetLog()
const Json::Value &Log::GetLog() noexcept
{
if (log_flag.GetChangeState()) //if there are changes
{