From 3ba2840e7ee81341b0748c0121aedc2e9305041a Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 10 Mar 2021 17:28:08 +0800 Subject: scripted-diff: remove MakeUnique() -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 /d' $(git grep -l '#include ' src) sed -i -e '/util\/memory.h \\/d' src/Makefile.am -END VERIFY SCRIPT- --- src/validation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/validation.cpp') diff --git a/src/validation.cpp b/src/validation.cpp index e7439a2a1a..7df2561375 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1287,7 +1287,7 @@ CoinsViews::CoinsViews( void CoinsViews::InitCache() { - m_cacheview = MakeUnique(&m_catcherview); + m_cacheview = std::make_unique(&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( + m_coins_views = std::make_unique( leveldb_name, cache_size_bytes, in_memory, should_wipe); } @@ -5279,7 +5279,7 @@ bool ChainstateManager::ActivateSnapshot( static_cast(current_coinsdb_cache_size * IBD_CACHE_PERC)); } - auto snapshot_chainstate = WITH_LOCK(::cs_main, return MakeUnique( + auto snapshot_chainstate = WITH_LOCK(::cs_main, return std::make_unique( this->ActiveChainstate().m_mempool, m_blockman, base_blockhash)); { -- cgit v1.2.3