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/HashFuncEntry.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'src/HashFuncEntry.h') diff --git a/src/HashFuncEntry.h b/src/HashFuncEntry.h index dfa86f46..3f280318 100644 --- a/src/HashFuncEntry.h +++ b/src/HashFuncEntry.h @@ -45,23 +45,22 @@ namespace aria2 { -template -struct HashFuncEntry { +template struct HashFuncEntry { typedef HashFunc HashFuncType; std::string hashType; HashFunc hashFunc; - HashFuncEntry(std::string hashType, const HashFunc& hashFunc): - hashType(std::move(hashType)), hashFunc(hashFunc) - {} + HashFuncEntry(std::string hashType, const HashFunc& hashFunc) + : hashType(std::move(hashType)), hashFunc(hashFunc) + { + } }; -template -class FindHashFunc { +template class FindHashFunc { private: const std::string& hashType_; + public: - FindHashFunc(const std::string& hashType):hashType_(hashType) - {} + FindHashFunc(const std::string& hashType) : hashType_(hashType) {} bool operator()(const HashFuncEntry& entry) const { @@ -69,17 +68,16 @@ public: } }; -template -const typename HashFuncEntry::HashFuncType& getHashFunc -(HashFuncEntry* first, HashFuncEntry* last, const std::string& hashType) +template +const typename HashFuncEntry::HashFuncType& +getHashFunc(HashFuncEntry* first, HashFuncEntry* last, + const std::string& hashType) { - HashFuncEntry* e = - std::find_if(first, last, - FindHashFunc - (hashType)); - if(e == last) { - throw DL_ABORT_EX - (fmt("Hash type %s is not supported.", hashType.c_str())); + HashFuncEntry* e = std::find_if( + first, last, + FindHashFunc(hashType)); + if (e == last) { + throw DL_ABORT_EX(fmt("Hash type %s is not supported.", hashType.c_str())); } return e->hashFunc; } -- cgit