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/BtNotInterestedMessage.cc | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/BtNotInterestedMessage.cc')
| -rw-r--r-- | src/BtNotInterestedMessage.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/BtNotInterestedMessage.cc b/src/BtNotInterestedMessage.cc index c79a27de..45c39de1 100644 --- a/src/BtNotInterestedMessage.cc +++ b/src/BtNotInterestedMessage.cc @@ -42,25 +42,25 @@ namespace aria2 { const char BtNotInterestedMessage::NAME[] = "not interested"; BtNotInterestedMessage::BtNotInterestedMessage() - : ZeroBtMessage(ID, NAME), - peerStorage_(nullptr) -{} + : ZeroBtMessage(ID, NAME), peerStorage_(nullptr) +{ +} BtNotInterestedMessage::~BtNotInterestedMessage() {} -std::unique_ptr<BtNotInterestedMessage> BtNotInterestedMessage::create -(const unsigned char* data, size_t dataLength) +std::unique_ptr<BtNotInterestedMessage> +BtNotInterestedMessage::create(const unsigned char* data, size_t dataLength) { return ZeroBtMessage::create<BtNotInterestedMessage>(data, dataLength); } void BtNotInterestedMessage::doReceivedAction() { - if(isMetadataGetMode()) { + if (isMetadataGetMode()) { return; } getPeer()->peerInterested(false); - if(!getPeer()->amChoking()) { + if (!getPeer()->amChoking()) { peerStorage_->executeChoke(); } } @@ -72,11 +72,10 @@ bool BtNotInterestedMessage::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(false); } } |
