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/init.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 8aa80eacca..dfa848c8c2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1349,7 +1349,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA } assert(!node.scheduler); - node.scheduler = MakeUnique(); + node.scheduler = std::make_unique(); // Start the lightweight task scheduler thread node.scheduler->m_service_thread = std::thread([&] { TraceThread("scheduler", [&] { node.scheduler->serviceQueue(); }); }); @@ -1401,9 +1401,9 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA const bool ignores_incoming_txs{args.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)}; assert(!node.banman); - node.banman = MakeUnique(GetDataDir() / "banlist.dat", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME)); + node.banman = std::make_unique(GetDataDir() / "banlist.dat", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME)); assert(!node.connman); - node.connman = MakeUnique(GetRand(std::numeric_limits::max()), GetRand(std::numeric_limits::max()), args.GetBoolArg("-networkactive", true)); + node.connman = std::make_unique(GetRand(std::numeric_limits::max()), GetRand(std::numeric_limits::max()), args.GetBoolArg("-networkactive", true)); assert(!node.fee_estimator); // Don't initialize fee estimation with old data if we don't relay transactions, @@ -1799,7 +1799,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA // ********************************************************* Step 8: start indexers if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { - g_txindex = MakeUnique(nTxIndexCache, false, fReindex); + g_txindex = std::make_unique(nTxIndexCache, false, fReindex); g_txindex->Start(); } -- cgit v1.2.3