From 5ba71503332c0013b94b52afc522f6e098a2f845 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 19 Aug 2013 23:50:14 +0900 Subject: [PATCH] Code cleanup --- src/bittorrent_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bittorrent_helper.h b/src/bittorrent_helper.h index 1587e065..890c2a94 100644 --- a/src/bittorrent_helper.h +++ b/src/bittorrent_helper.h @@ -291,7 +291,7 @@ void extractPeer(const ValueBase* peerData, int family, OutputIterator dest) if(p.first.empty()) { continue; } - *dest_++ = std::shared_ptr(new Peer(p.first, p.second)); + *dest_++ = std::make_shared(p.first, p.second); } } } @@ -315,7 +315,7 @@ void extractPeer(const ValueBase* peerData, int family, OutputIterator dest) if(!ip || !port || !(0 < port->i() && port->i() < 65536)) { continue; } - *dest_ = std::shared_ptr(new Peer(ip->s(), port->i())); + *dest_ = std::make_shared(ip->s(), port->i()); ++dest_; } }