🐛 add trans was skipping ChangeOn() when full

This commit is contained in:
EntireTwix 2021-07-08 20:42:26 -07:00
parent b1f0aad79e
commit 6e57178dc8

View file

@ -2,6 +2,7 @@
void Log::AddTrans(Transaction &&t) noexcept void Log::AddTrans(Transaction &&t) noexcept
{ {
log_flag.SetChangesOn();
#if MAX_LOG_SIZE == 1 #if MAX_LOG_SIZE == 1
data = std::move(t); data = std::move(t);
#else #else
@ -16,7 +17,6 @@ void Log::AddTrans(Transaction &&t) noexcept
} }
data.push_back(std::move(t)); // In either case we have space under max length, move to new spot data.push_back(std::move(t)); // In either case we have space under max length, move to new spot
#endif #endif
log_flag.SetChangesOn();
} }
const std::string &Log::GetLog() noexcept const std::string &Log::GetLog() noexcept