mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-27 06:19:09 +01:00
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-
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user