summaryrefslogtreecommitdiff
path: root/src/BtStopDownloadCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:39:47 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:40:08 +0900
commitb1132d6b10cd3791b9529d7031d723fd0e2d8215 (patch)
tree9ce465b42bf09372118335c7c619bb2b41869eaf /src/BtStopDownloadCommand.cc
parent4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff)
make clang-format using clang-format-3.6
Diffstat (limited to 'src/BtStopDownloadCommand.cc')
-rw-r--r--src/BtStopDownloadCommand.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/BtStopDownloadCommand.cc b/src/BtStopDownloadCommand.cc
index 74b3b89d..fb009f26 100644
--- a/src/BtStopDownloadCommand.cc
+++ b/src/BtStopDownloadCommand.cc
@@ -46,22 +46,22 @@
namespace aria2 {
-BtStopDownloadCommand::BtStopDownloadCommand
-(cuid_t cuid,
- RequestGroup* requestGroup,
- DownloadEngine* e,
- std::chrono::seconds timeout)
- : TimeBasedCommand(cuid, e, 1_s),
- requestGroup_(requestGroup),
- timeout_(std::move(timeout))
-{}
+BtStopDownloadCommand::BtStopDownloadCommand(cuid_t cuid,
+ RequestGroup* requestGroup,
+ DownloadEngine* e,
+ std::chrono::seconds timeout)
+ : TimeBasedCommand(cuid, e, 1_s),
+ requestGroup_(requestGroup),
+ timeout_(std::move(timeout))
+{
+}
void BtStopDownloadCommand::preProcess()
{
- if(btRuntime_->isHalt() || pieceStorage_->downloadFinished()) {
+ if (btRuntime_->isHalt() || pieceStorage_->downloadFinished()) {
enableExit();
}
- if(checkPoint_.difference(global::wallclock()) >= timeout_) {
+ if (checkPoint_.difference(global::wallclock()) >= timeout_) {
A2_LOG_NOTICE(fmt(_("GID#%s Stop downloading torrent due to"
" --bt-stop-timeout option."),
GroupId::toHex(requestGroup_->getGID()).c_str()));
@@ -74,7 +74,7 @@ void BtStopDownloadCommand::preProcess()
void BtStopDownloadCommand::process()
{
NetStat& stat = requestGroup_->getDownloadContext()->getNetStat();
- if(stat.calculateDownloadSpeed() > 0) {
+ if (stat.calculateDownloadSpeed() > 0) {
checkPoint_ = global::wallclock();
}
}