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/BtFileAllocationEntry.cc | |
| parent | 4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff) | |
make clang-format using clang-format-3.6
Diffstat (limited to 'src/BtFileAllocationEntry.cc')
| -rw-r--r-- | src/BtFileAllocationEntry.cc | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/BtFileAllocationEntry.cc b/src/BtFileAllocationEntry.cc index 89a4c7c4..ed44e44e 100644 --- a/src/BtFileAllocationEntry.cc +++ b/src/BtFileAllocationEntry.cc @@ -50,36 +50,39 @@ namespace aria2 { -BtFileAllocationEntry::BtFileAllocationEntry(RequestGroup* requestGroup): - FileAllocationEntry(requestGroup, nullptr) {} +BtFileAllocationEntry::BtFileAllocationEntry(RequestGroup* requestGroup) + : FileAllocationEntry(requestGroup, nullptr) +{ +} BtFileAllocationEntry::~BtFileAllocationEntry() {} -void BtFileAllocationEntry::prepareForNextAction -(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) +void BtFileAllocationEntry::prepareForNextAction( + std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) { - auto &option = getRequestGroup()->getOption(); + auto& option = getRequestGroup()->getOption(); BtSetup().setup(commands, getRequestGroup(), e, option.get()); - if(option->getAsBool(PREF_ENABLE_MMAP) && - option->get(PREF_FILE_ALLOCATION) != V_NONE) { + if (option->getAsBool(PREF_ENABLE_MMAP) && + option->get(PREF_FILE_ALLOCATION) != V_NONE) { getRequestGroup()->getPieceStorage()->getDiskAdaptor()->enableMmap(); } - if(!getRequestGroup()->downloadFinished()) { + if (!getRequestGroup()->downloadFinished()) { // For DownloadContext::resetDownloadStartTime(), see also // RequestGroup::createInitialCommand() getRequestGroup()->getDownloadContext()->resetDownloadStartTime(); - const std::vector<std::shared_ptr<FileEntry> >& fileEntries = - getRequestGroup()->getDownloadContext()->getFileEntries(); - if(isUriSuppliedForRequsetFileEntry - (std::begin(fileEntries), std::end(fileEntries))) { + const std::vector<std::shared_ptr<FileEntry>>& fileEntries = + getRequestGroup()->getDownloadContext()->getFileEntries(); + if (isUriSuppliedForRequsetFileEntry(std::begin(fileEntries), + std::end(fileEntries))) { getRequestGroup()->createNextCommandWithAdj(commands, e, 0); } - } else { + } + else { #ifdef __MINGW32__ const std::shared_ptr<DiskAdaptor>& diskAdaptor = - getRequestGroup()->getPieceStorage()->getDiskAdaptor(); - if(!diskAdaptor->isReadOnlyEnabled()) { + getRequestGroup()->getPieceStorage()->getDiskAdaptor(); + if (!diskAdaptor->isReadOnlyEnabled()) { // On Windows, if aria2 opens files with GENERIC_WRITE access // right, some programs cannot open them aria2 is seeding. To // avoid this situation, re-open the files with read-only |
