diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 00:59:55 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 00:59:55 +0900 |
| commit | bef6236da80cb18a3212bde7c33c556883cbd536 (patch) | |
| tree | 8faeefde90feeaeb0d7c52d75dcc5189f8c25ea0 /src/RpcMethodImpl.cc | |
| parent | 1a299c4d7cf5ab8d130e678d152c4c47ae3430ea (diff) | |
DownloadContext::attrs_ now holds std::unique_ptr
DownloadContext::getAttribute() returns a raw pointer.
Diffstat (limited to 'src/RpcMethodImpl.cc')
| -rw-r--r-- | src/RpcMethodImpl.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc index 4118104e..ddbb8435 100644 --- a/src/RpcMethodImpl.cc +++ b/src/RpcMethodImpl.cc @@ -697,8 +697,7 @@ void gatherProgressCommon #ifdef ENABLE_BITTORRENT void gatherBitTorrentMetadata -(const std::shared_ptr<Dict>& btDict, - const std::shared_ptr<TorrentAttribute>& torrentAttrs) +(const std::shared_ptr<Dict>& btDict, TorrentAttribute* torrentAttrs) { if(!torrentAttrs->comment.empty()) { btDict->put(KEY_COMMENT, torrentAttrs->comment); @@ -731,7 +730,7 @@ void gatherBitTorrentMetadata namespace { void gatherProgressBitTorrent (const std::shared_ptr<Dict>& entryDict, - const std::shared_ptr<TorrentAttribute>& torrentAttrs, + TorrentAttribute* torrentAttrs, const std::shared_ptr<BtObject>& btObject, const std::vector<std::string>& keys) { @@ -801,7 +800,7 @@ void gatherProgress gatherProgressCommon(entryDict, group, keys); #ifdef ENABLE_BITTORRENT if(group->getDownloadContext()->hasAttribute(CTX_ATTR_BT)) { - std::shared_ptr<TorrentAttribute> torrentAttrs = + auto torrentAttrs = bittorrent::getTorrentAttrs(group->getDownloadContext()); const std::shared_ptr<BtObject>& btObject = e->getBtRegistry()->get(group->getGID()); |
