diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-02 22:58:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-02 22:58:20 +0900 |
| commit | 1a5d75e819604a46b72d1f07401ac5017c96ad15 (patch) | |
| tree | a8aec0ebdb53f2207cbabe0abee8ff9c36ef7193 /src/DHTFindNodeReplyMessage.h | |
| parent | 4f7d1c395bf7fd8826c235c69edf8328e71917a5 (diff) | |
Use std::unique_ptr to store DHTMessages instead of std::shared_ptr
Diffstat (limited to 'src/DHTFindNodeReplyMessage.h')
| -rw-r--r-- | src/DHTFindNodeReplyMessage.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/DHTFindNodeReplyMessage.h b/src/DHTFindNodeReplyMessage.h index eb62dba1..3d344e48 100644 --- a/src/DHTFindNodeReplyMessage.h +++ b/src/DHTFindNodeReplyMessage.h @@ -44,7 +44,7 @@ class DHTFindNodeReplyMessage:public DHTResponseMessage { private: int family_; - std::vector<std::shared_ptr<DHTNode> > closestKNodes_; + std::vector<std::shared_ptr<DHTNode>> closestKNodes_; protected: virtual std::string toStringOptional() const; public: @@ -53,8 +53,6 @@ public: const std::shared_ptr<DHTNode>& remoteNode, const std::string& transactionID); - virtual ~DHTFindNodeReplyMessage(); - virtual void doReceivedAction(); virtual std::shared_ptr<Dict> getResponse(); @@ -63,13 +61,12 @@ public: virtual void accept(DHTMessageCallback* callback); - const std::vector<std::shared_ptr<DHTNode> >& getClosestKNodes() const + const std::vector<std::shared_ptr<DHTNode>>& getClosestKNodes() const { return closestKNodes_; } - void setClosestKNodes - (const std::vector<std::shared_ptr<DHTNode> >& closestKNodes); + void setClosestKNodes(std::vector<std::shared_ptr<DHTNode>> closestKNodes); static const std::string FIND_NODE; |
