diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-27 18:39:47 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-12-27 18:40:08 +0900 |
| commit | b1132d6b10cd3791b9529d7031d723fd0e2d8215 (patch) | |
| tree | 9ce465b42bf09372118335c7c619bb2b41869eaf /src/BtInterestedMessage.cc | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/BtInterestedMessage.cc')
| -rw-r--r-- | src/BtInterestedMessage.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/BtInterestedMessage.cc b/src/BtInterestedMessage.cc index 2ef30600..c3c9fec2 100644 --- a/src/BtInterestedMessage.cc +++ b/src/BtInterestedMessage.cc @@ -42,25 +42,25 @@ namespace aria2 { const char BtInterestedMessage::NAME[] = "interested"; BtInterestedMessage::BtInterestedMessage() - : ZeroBtMessage(ID, NAME), - peerStorage_(nullptr) -{} + : ZeroBtMessage(ID, NAME), peerStorage_(nullptr) +{ +} BtInterestedMessage::~BtInterestedMessage() {} -std::unique_ptr<BtInterestedMessage> BtInterestedMessage::create -(const unsigned char* data, size_t dataLength) +std::unique_ptr<BtInterestedMessage> +BtInterestedMessage::create(const unsigned char* data, size_t dataLength) { return ZeroBtMessage::create<BtInterestedMessage>(data, dataLength); } void BtInterestedMessage::doReceivedAction() { - if(isMetadataGetMode()) { + if (isMetadataGetMode()) { return; } getPeer()->peerInterested(true); - if(!getPeer()->amChoking()) { + if (!getPeer()->amChoking()) { peerStorage_->executeChoke(); } } @@ -72,11 +72,10 @@ bool BtInterestedMessage::sendPredicate() const namespace { struct ThisProgressUpdate : public ProgressUpdate { - ThisProgressUpdate(std::shared_ptr<Peer> peer) - : peer(std::move(peer)) {} + ThisProgressUpdate(std::shared_ptr<Peer> peer) : peer(std::move(peer)) {} virtual void update(size_t length, bool complete) CXX11_OVERRIDE { - if(complete) { + if (complete) { peer->amInterested(true); } } |
