diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-02 23:52:40 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-02 23:52:40 +0900 |
| commit | f022402dc91e7796032dfbeacd730bb8bf201920 (patch) | |
| tree | c1077b38113cbdf3fc8f2ac01c8846e770d81814 /src/DHTInteractionCommand.cc | |
| parent | 1a5d75e819604a46b72d1f07401ac5017c96ad15 (diff) | |
Use std::unique_ptr in DHTRegistry
Diffstat (limited to 'src/DHTInteractionCommand.cc')
| -rw-r--r-- | src/DHTInteractionCommand.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/DHTInteractionCommand.cc b/src/DHTInteractionCommand.cc index 31f84d74..fe193cd4 100644 --- a/src/DHTInteractionCommand.cc +++ b/src/DHTInteractionCommand.cc @@ -57,8 +57,11 @@ namespace aria2 { // TODO This name of this command is misleading, because now it also // handles UDP trackers as well as DHT. DHTInteractionCommand::DHTInteractionCommand(cuid_t cuid, DownloadEngine* e) - : Command(cuid), - e_(e) + : Command{cuid}, + e_{e}, + dispatcher_{nullptr}, + receiver_{nullptr}, + taskQueue_{nullptr} {} DHTInteractionCommand::~DHTInteractionCommand() @@ -142,17 +145,18 @@ bool DHTInteractionCommand::execute() return false; } -void DHTInteractionCommand::setMessageDispatcher(const std::shared_ptr<DHTMessageDispatcher>& dispatcher) +void DHTInteractionCommand::setMessageDispatcher +(DHTMessageDispatcher* dispatcher) { dispatcher_ = dispatcher; } -void DHTInteractionCommand::setMessageReceiver(const std::shared_ptr<DHTMessageReceiver>& receiver) +void DHTInteractionCommand::setMessageReceiver(DHTMessageReceiver* receiver) { receiver_ = receiver; } -void DHTInteractionCommand::setTaskQueue(const std::shared_ptr<DHTTaskQueue>& taskQueue) +void DHTInteractionCommand::setTaskQueue(DHTTaskQueue* taskQueue) { taskQueue_ = taskQueue; } |
