From c94c19cbe1550ea1ec2c1dec64fbecae4909a469 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Mon, 12 Jul 2021 21:34:21 -0700 Subject: [PATCH] :racehorse: made GetLogs() return move rather then const ref --- include/log.h | 2 +- src/log.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/log.h b/include/log.h index cfa9270..8988048 100644 --- a/include/log.h +++ b/include/log.h @@ -22,7 +22,7 @@ public: std::vector data; #endif - const std::string &GetLogs() noexcept; + std::string GetLogs() noexcept; void AddTrans(const Transaction &t) noexcept; Json::Value Serialize() const; // to be removed later }; diff --git a/src/log.cpp b/src/log.cpp index c0fed03..cdaeb6b 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -19,7 +19,7 @@ void Log::AddTrans(const Transaction &t) noexcept #endif } -const std::string &Log::GetLogs() noexcept +std::string Log::GetLogs() noexcept { if (log_flag.GetChangeState() && data.size()) //if there are changes {