diff options
| author | practicalswift <[email protected]> | 2017-08-15 07:46:56 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-11-09 16:53:34 +0100 |
| commit | 3e09b390b411298b9da8cc3f92132bfad15ac156 (patch) | |
| tree | 034c464e339d74d67ee61f32ca23e82cb03b3d21 /src/net.cpp | |
| parent | Add MakeUnique (substitute for C++14 std::make_unique) (diff) | |
| download | discoin-3e09b390b411298b9da8cc3f92132bfad15ac156.tar.xz discoin-3e09b390b411298b9da8cc3f92132bfad15ac156.zip | |
Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index 6b0c131cf..0f9de81d7 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; |