diff options
author | fanquake <fanquake@gmail.com> | 2021-03-10 17:28:08 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-03-11 13:45:14 +0800 |
commit | 3ba2840e7ee81341b0748c0121aedc2e9305041a (patch) | |
tree | 1249a7df5095bc27d9af6cb214bb9f9530eb2fa4 /src/wallet/bdb.cpp | |
parent | 63314b8211d795b2bf0814e244d801e74f50b152 (diff) |
scripted-diff: remove MakeUnique<T>()
-BEGIN VERIFY SCRIPT-
git rm src/util/memory.h
sed -i -e 's/MakeUnique/std::make_unique/g' $(git grep -l MakeUnique src)
sed -i -e '/#include <util\/memory.h>/d' $(git grep -l '#include <util/memory.h>' src)
sed -i -e '/util\/memory.h \\/d' src/Makefile.am
-END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r-- | src/wallet/bdb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index ad40e6da9a..1dc23374e3 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -331,7 +331,7 @@ void BerkeleyDatabase::Open() if (m_db == nullptr) { int ret; - std::unique_ptr<Db> pdb_temp = MakeUnique<Db>(env->dbenv.get(), 0); + std::unique_ptr<Db> pdb_temp = std::make_unique<Db>(env->dbenv.get(), 0); bool fMockDb = env->IsMock(); if (fMockDb) { @@ -462,7 +462,7 @@ bool BerkeleyDatabase::Rewrite(const char* pszSkip) std::string strFileRes = strFile + ".rewrite"; { // surround usage of db with extra {} BerkeleyBatch db(*this, true); - std::unique_ptr<Db> pdbCopy = MakeUnique<Db>(env->dbenv.get(), 0); + std::unique_ptr<Db> pdbCopy = std::make_unique<Db>(env->dbenv.get(), 0); int ret = pdbCopy->open(nullptr, // Txn pointer strFileRes.c_str(), // Filename @@ -819,7 +819,7 @@ void BerkeleyDatabase::RemoveRef() std::unique_ptr<DatabaseBatch> BerkeleyDatabase::MakeBatch(bool flush_on_close) { - return MakeUnique<BerkeleyBatch>(*this, false, flush_on_close); + return std::make_unique<BerkeleyBatch>(*this, false, flush_on_close); } std::unique_ptr<BerkeleyDatabase> MakeBerkeleyDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error) @@ -835,7 +835,7 @@ std::unique_ptr<BerkeleyDatabase> MakeBerkeleyDatabase(const fs::path& path, con status = DatabaseStatus::FAILED_ALREADY_LOADED; return nullptr; } - db = MakeUnique<BerkeleyDatabase>(std::move(env), std::move(data_filename)); + db = std::make_unique<BerkeleyDatabase>(std::move(env), std::move(data_filename)); } if (options.verify && !db->Verify(error)) { |