From f022402dc91e7796032dfbeacd730bb8bf201920 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 2 Jul 2013 23:52:40 +0900 Subject: Use std::unique_ptr in DHTRegistry --- src/DHTInteractionCommand.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/DHTInteractionCommand.cc') 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& dispatcher) +void DHTInteractionCommand::setMessageDispatcher +(DHTMessageDispatcher* dispatcher) { dispatcher_ = dispatcher; } -void DHTInteractionCommand::setMessageReceiver(const std::shared_ptr& receiver) +void DHTInteractionCommand::setMessageReceiver(DHTMessageReceiver* receiver) { receiver_ = receiver; } -void DHTInteractionCommand::setTaskQueue(const std::shared_ptr& taskQueue) +void DHTInteractionCommand::setTaskQueue(DHTTaskQueue* taskQueue) { taskQueue_ = taskQueue; } -- cgit