diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/UTMetadataRequestFactory.h | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/UTMetadataRequestFactory.h')
| -rw-r--r-- | src/UTMetadataRequestFactory.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/UTMetadataRequestFactory.h b/src/UTMetadataRequestFactory.h index 7af3e8da..8839cfe4 100644 --- a/src/UTMetadataRequestFactory.h +++ b/src/UTMetadataRequestFactory.h @@ -38,8 +38,8 @@ #include "common.h" #include <vector> +#include <memory> -#include "SharedHandle.h" #include "Command.h" namespace aria2 { @@ -54,9 +54,9 @@ class BtMessage; class UTMetadataRequestFactory { private: - SharedHandle<DownloadContext> dctx_; + std::shared_ptr<DownloadContext> dctx_; - SharedHandle<Peer> peer_; + std::shared_ptr<Peer> peer_; BtMessageDispatcher* dispatcher_; @@ -69,10 +69,10 @@ public: // Creates at most num of ut_metadata request message and appends // them to msgs. pieceStorage is used to identify missing piece. - void create(std::vector<SharedHandle<BtMessage> >& msgs, size_t num, - const SharedHandle<PieceStorage>& pieceStorage); + void create(std::vector<std::shared_ptr<BtMessage> >& msgs, size_t num, + const std::shared_ptr<PieceStorage>& pieceStorage); - void setDownloadContext(const SharedHandle<DownloadContext>& dctx) + void setDownloadContext(const std::shared_ptr<DownloadContext>& dctx) { dctx_ = dctx; } @@ -87,7 +87,7 @@ public: messageFactory_ = factory; } - void setPeer(const SharedHandle<Peer>& peer) + void setPeer(const std::shared_ptr<Peer>& peer) { peer_ = peer; } |
