From b1132d6b10cd3791b9529d7031d723fd0e2d8215 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 27 Dec 2015 18:39:47 +0900 Subject: make clang-format using clang-format-3.6 --- src/Metalink2RequestGroup.cc | 206 +++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 107 deletions(-) (limited to 'src/Metalink2RequestGroup.cc') diff --git a/src/Metalink2RequestGroup.cc b/src/Metalink2RequestGroup.cc index 6f0c3142..31ab2ff1 100644 --- a/src/Metalink2RequestGroup.cc +++ b/src/Metalink2RequestGroup.cc @@ -61,8 +61,8 @@ #include "download_handlers.h" #include "RequestGroupCriteria.h" #ifdef ENABLE_BITTORRENT -# include "BtDependency.h" -# include "download_helper.h" +#include "BtDependency.h" +#include "download_helper.h" #endif // ENABLE_BITTORRENT #include "Checksum.h" #include "ChunkChecksum.h" @@ -75,12 +75,13 @@ namespace { class AccumulateNonP2PUri { private: std::vector& urisPtr; + public: - AccumulateNonP2PUri(std::vector& urisPtr) - :urisPtr(urisPtr) {} + AccumulateNonP2PUri(std::vector& urisPtr) : urisPtr(urisPtr) {} - void operator()(const std::unique_ptr& resource) { - switch(resource->type) { + void operator()(const std::unique_ptr& resource) + { + switch (resource->type) { case MetalinkResource::TYPE_HTTP: case MetalinkResource::TYPE_HTTPS: case MetalinkResource::TYPE_FTP: @@ -98,102 +99,96 @@ class FindBitTorrentUri { public: FindBitTorrentUri() {} - bool operator()(const std::shared_ptr& resource) { - if(resource->type == MetalinkResource::TYPE_BITTORRENT) { + bool operator()(const std::shared_ptr& resource) + { + if (resource->type == MetalinkResource::TYPE_BITTORRENT) { return true; - } else { + } + else { return false; } } }; } // namespace -void -Metalink2RequestGroup::generate -(std::vector>& groups, - const std::string& metalinkFile, - const std::shared_ptr