summaryrefslogtreecommitdiff
path: root/src/BtSetup.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 18:42:57 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 18:42:57 +0900
commitcc3cd8a58b11d639c327ca6debb041747c3828d6 (patch)
tree5ac46b795cf8e0780119677f2ec399314b26fd5a /src/BtSetup.cc
parent3a3ac4ef9b687274fc123dd1adf5b5f5e02d013d (diff)
DownloadEngine: Use std::unique_ptr for btRegistry_
Diffstat (limited to 'src/BtSetup.cc')
-rw-r--r--src/BtSetup.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/BtSetup.cc b/src/BtSetup.cc
index 595c2987..31ee458e 100644
--- a/src/BtSetup.cc
+++ b/src/BtSetup.cc
@@ -101,12 +101,12 @@ void BtSetup::setup(std::vector<std::unique_ptr<Command>>& commands,
auto torrentAttrs =
bittorrent::getTorrentAttrs(requestGroup->getDownloadContext());
bool metadataGetMode = torrentAttrs->metadata.empty();
- const std::shared_ptr<BtRegistry>& btReg = e->getBtRegistry();
- const std::shared_ptr<BtObject>& btObject = btReg->get(requestGroup->getGID());
- const std::shared_ptr<PieceStorage>& pieceStorage = btObject->pieceStorage;
- const std::shared_ptr<PeerStorage>& peerStorage = btObject->peerStorage;
- const std::shared_ptr<BtRuntime>& btRuntime = btObject->btRuntime;
- const std::shared_ptr<BtAnnounce>& btAnnounce = btObject->btAnnounce;
+ auto& btReg = e->getBtRegistry();
+ auto& btObject = btReg->get(requestGroup->getGID());
+ auto& pieceStorage = btObject->pieceStorage;
+ auto& peerStorage = btObject->peerStorage;
+ auto& btRuntime = btObject->btRuntime;
+ auto& btAnnounce = btObject->btAnnounce;
// commands
{
auto c = make_unique<TrackerWatcherCommand>(e->newCUID(), requestGroup, e);