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/DHTTaskExecutor.cc | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/DHTTaskExecutor.cc')
| -rw-r--r-- | src/DHTTaskExecutor.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/DHTTaskExecutor.cc b/src/DHTTaskExecutor.cc index afe5a889..ed398a5b 100644 --- a/src/DHTTaskExecutor.cc +++ b/src/DHTTaskExecutor.cc @@ -45,8 +45,9 @@ namespace aria2 { DHTTaskExecutor::DHTTaskExecutor(int numConcurrent) - : numConcurrent_(numConcurrent) -{} + : numConcurrent_(numConcurrent) +{ +} DHTTaskExecutor::~DHTTaskExecutor() {} @@ -56,16 +57,17 @@ void DHTTaskExecutor::update() std::mem_fn(&DHTTask::finished)), execTasks_.end()); int r; - if(static_cast<size_t>(numConcurrent_) > execTasks_.size()) { - r = numConcurrent_-execTasks_.size(); - } else { + if (static_cast<size_t>(numConcurrent_) > execTasks_.size()) { + r = numConcurrent_ - execTasks_.size(); + } + else { r = 0; } - while(r && !queue_.empty()) { + while (r && !queue_.empty()) { std::shared_ptr<DHTTask> task = queue_.front(); queue_.pop_front(); task->startup(); - if(!task->finished()) { + if (!task->finished()) { execTasks_.push_back(task); --r; } |
