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:
fanquake
2021-03-10 17:28:08 +08:00
parent 63314b8211
commit 3ba2840e7e
47 changed files with 110 additions and 156 deletions

View File

@@ -1287,7 +1287,7 @@ CoinsViews::CoinsViews(
void CoinsViews::InitCache()
{
m_cacheview = MakeUnique<CCoinsViewCache>(&m_catcherview);
m_cacheview = std::make_unique<CCoinsViewCache>(&m_catcherview);
}
CChainState::CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash)
@@ -1305,7 +1305,7 @@ void CChainState::InitCoinsDB(
leveldb_name += "_" + m_from_snapshot_blockhash.ToString();
}
m_coins_views = MakeUnique<CoinsViews>(
m_coins_views = std::make_unique<CoinsViews>(
leveldb_name, cache_size_bytes, in_memory, should_wipe);
}
@@ -5279,7 +5279,7 @@ bool ChainstateManager::ActivateSnapshot(
static_cast<size_t>(current_coinsdb_cache_size * IBD_CACHE_PERC));
}
auto snapshot_chainstate = WITH_LOCK(::cs_main, return MakeUnique<CChainState>(
auto snapshot_chainstate = WITH_LOCK(::cs_main, return std::make_unique<CChainState>(
this->ActiveChainstate().m_mempool, m_blockman, base_blockhash));
{