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/TimedHaltCommand.cc | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/TimedHaltCommand.cc')
| -rw-r--r-- | src/TimedHaltCommand.cc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/TimedHaltCommand.cc b/src/TimedHaltCommand.cc index 1f3470cd..4939fd7a 100644 --- a/src/TimedHaltCommand.cc +++ b/src/TimedHaltCommand.cc @@ -42,32 +42,33 @@ namespace aria2 { -TimedHaltCommand::TimedHaltCommand -(cuid_t cuid, DownloadEngine* e, - std::chrono::seconds secondsToHalt, - bool forceHalt) - : TimeBasedCommand(cuid, e, std::move(secondsToHalt), true), - forceHalt_(forceHalt) -{} +TimedHaltCommand::TimedHaltCommand(cuid_t cuid, DownloadEngine* e, + std::chrono::seconds secondsToHalt, + bool forceHalt) + : TimeBasedCommand(cuid, e, std::move(secondsToHalt), true), + forceHalt_(forceHalt) +{ +} TimedHaltCommand::~TimedHaltCommand() {} void TimedHaltCommand::preProcess() { - if(getDownloadEngine()->getRequestGroupMan()->downloadFinished() || - getDownloadEngine()->isHaltRequested()) { + if (getDownloadEngine()->getRequestGroupMan()->downloadFinished() || + getDownloadEngine()->isHaltRequested()) { enableExit(); } } void TimedHaltCommand::process() { - if(!getDownloadEngine()->isHaltRequested()) { - A2_LOG_NOTICE(fmt(MSG_TIME_HAS_PASSED, - static_cast<long int>(getInterval().count()))); - if(forceHalt_) { + if (!getDownloadEngine()->isHaltRequested()) { + A2_LOG_NOTICE( + fmt(MSG_TIME_HAS_PASSED, static_cast<long int>(getInterval().count()))); + if (forceHalt_) { getDownloadEngine()->requestForceHalt(); - } else { + } + else { getDownloadEngine()->requestHalt(); } enableExit(); |
