From 3e09b390b411298b9da8cc3f92132bfad15ac156 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 15 Aug 2017 07:46:56 +0200 Subject: Use MakeUnique(...) instead of std::unique_ptr(new T(...)) --- src/net.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 6b0c131cf3..0f9de81d7f 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2327,11 +2327,11 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions) if (semOutbound == nullptr) { // initialize semaphore - semOutbound = std::unique_ptr(new CSemaphore(std::min((nMaxOutbound + nMaxFeeler), nMaxConnections))); + semOutbound = MakeUnique(std::min((nMaxOutbound + nMaxFeeler), nMaxConnections)); } if (semAddnode == nullptr) { // initialize semaphore - semAddnode = std::unique_ptr(new CSemaphore(nMaxAddnode)); + semAddnode = MakeUnique(nMaxAddnode); } // @@ -2741,7 +2741,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn nNextInvSend = 0; fRelayTxes = false; fSentAddr = false; - pfilter = std::unique_ptr(new CBloomFilter()); + pfilter = MakeUnique(); timeLastMempoolReq = 0; nLastBlockTime = 0; nLastTXTime = 0; -- cgit v1.2.3