From 7aafb5a393338b05e6ec65565df4f1ec85161e5d Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Thu, 26 Sep 2024 02:27:10 +0700 Subject: [PATCH] fix: add one more file to list of non-backported (flat-database.h) --- src/flat-database.h | 14 +++++++------- test/util/data/non-backported.txt | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/flat-database.h b/src/flat-database.h index 8ad452c554..5034d7a7da 100644 --- a/src/flat-database.h +++ b/src/flat-database.h @@ -117,9 +117,9 @@ private: } - unsigned char pchMsgTmp[4]; - std::string strMagicMessageTmp; try { + unsigned char pchMsgTmp[4]; + std::string strMagicMessageTmp; // de-serialize file header (file specific magic message) and .. ssObj >> strMagicMessageTmp; @@ -178,11 +178,11 @@ private: } public: - CFlatDB(std::string strFilenameIn, std::string strMagicMessageIn) + CFlatDB(std::string&& strFilenameIn, std::string&& strMagicMessageIn) : + pathDB{gArgs.GetDataDirNet() / strFilenameIn}, + strFilename{strFilenameIn}, + strMagicMessage{strMagicMessageIn} { - pathDB = gArgs.GetDataDirNet() / strFilenameIn; - strFilename = strFilenameIn; - strMagicMessage = strMagicMessageIn; } bool Load(T& objToLoad) @@ -191,7 +191,7 @@ public: return Read(objToLoad); } - bool Store(T& objToSave) + bool Store(const T& objToSave) { LogPrintf("Verifying %s format...\n", strFilename); T tmpObjToLoad; diff --git a/test/util/data/non-backported.txt b/test/util/data/non-backported.txt index 7684074874..b37f350112 100644 --- a/test/util/data/non-backported.txt +++ b/test/util/data/non-backported.txt @@ -9,6 +9,7 @@ src/coinjoin/*.h src/ctpl_stl.h src/cxxtimer.hpp src/dsnotificationinterface.* +src/flat-database.h src/evo/*.cpp src/evo/*.h src/governance/*.cpp