aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-15 07:46:56 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-11-09 16:53:34 +0100
commit3e09b390b411298b9da8cc3f92132bfad15ac156 (patch)
tree034c464e339d74d67ee61f32ca23e82cb03b3d21 /src/net.cpp
parent86179897e230d8e5244fa7690ae1bc84b7958b9b (diff)
Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 3 insertions, 3 deletions
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<CSemaphore>(new CSemaphore(std::min((nMaxOutbound + nMaxFeeler), nMaxConnections)));
+ semOutbound = MakeUnique<CSemaphore>(std::min((nMaxOutbound + nMaxFeeler), nMaxConnections));
}
if (semAddnode == nullptr) {
// initialize semaphore
- semAddnode = std::unique_ptr<CSemaphore>(new CSemaphore(nMaxAddnode));
+ semAddnode = MakeUnique<CSemaphore>(nMaxAddnode);
}
//
@@ -2741,7 +2741,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
nNextInvSend = 0;
fRelayTxes = false;
fSentAddr = false;
- pfilter = std::unique_ptr<CBloomFilter>(new CBloomFilter());
+ pfilter = MakeUnique<CBloomFilter>();
timeLastMempoolReq = 0;
nLastBlockTime = 0;
nLastTXTime = 0;