From 2807258279d8ddbef01ca1c20a87c14aa084620c Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 13 Sep 2014 00:07:21 +0900 Subject: Use std::make_shared and make_unique where possible, part 1 --- src/DefaultBtAnnounce.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/DefaultBtAnnounce.cc') diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc index 74e2c2ed..a5a73bb0 100644 --- a/src/DefaultBtAnnounce.cc +++ b/src/DefaultBtAnnounce.cc @@ -210,7 +210,7 @@ std::shared_ptr DefaultBtAnnounce::createUDPTrackerRequest NetStat& stat = downloadContext_->getNetStat(); int64_t left = pieceStorage_->getTotalLength()-pieceStorage_->getCompletedLength(); - std::shared_ptr req(new UDPTrackerRequest()); + auto req = std::make_shared(); req->remoteAddr = remoteAddr; req->remotePort = remotePort; req->action = UDPT_ACT_ANNOUNCE; -- cgit