diff --git a/include/log.h b/include/log.h index f56b70f..62b3a66 100644 --- a/include/log.h +++ b/include/log.h @@ -13,9 +13,9 @@ private: Json::Value log_snapshot; public: - const Json::Value &GetLog(); - std::vector data; - void AddTrans(Transaction &&t); + + const Json::Value &GetLog() noexcept; + void AddTrans(Transaction &&t) noexcept; Json::Value Serialize() const; // to be removed later }; diff --git a/src/log.cpp b/src/log.cpp index 2eec0b7..dd3b308 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -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 {