diff --git a/src/BtLeecherStateChoke.cc b/src/BtLeecherStateChoke.cc index cd48b321..7dd2126e 100644 --- a/src/BtLeecherStateChoke.cc +++ b/src/BtLeecherStateChoke.cc @@ -62,8 +62,7 @@ BtLeecherStateChoke::PeerEntry::PeerEntry(const std::shared_ptr& peer) { } -BtLeecherStateChoke::PeerEntry::PeerEntry(const PeerEntry& c) - = default; +BtLeecherStateChoke::PeerEntry::PeerEntry(const PeerEntry& c) = default; void BtLeecherStateChoke::PeerEntry::swap(PeerEntry& c) { diff --git a/src/BtSeederStateChoke.cc b/src/BtSeederStateChoke.cc index 6e1b719d..e80291a2 100644 --- a/src/BtSeederStateChoke.cc +++ b/src/BtSeederStateChoke.cc @@ -65,8 +65,7 @@ BtSeederStateChoke::PeerEntry::PeerEntry(const std::shared_ptr& peer) { } -BtSeederStateChoke::PeerEntry::PeerEntry(const PeerEntry& c) - = default; +BtSeederStateChoke::PeerEntry::PeerEntry(const PeerEntry& c) = default; BtSeederStateChoke::PeerEntry::~PeerEntry() = default; diff --git a/src/DNSCache.cc b/src/DNSCache.cc index 4ca4a609..583fbf3e 100644 --- a/src/DNSCache.cc +++ b/src/DNSCache.cc @@ -42,8 +42,7 @@ DNSCache::AddrEntry::AddrEntry(const std::string& addr) { } -DNSCache::AddrEntry::AddrEntry(const AddrEntry& c) - = default; +DNSCache::AddrEntry::AddrEntry(const AddrEntry& c) = default; DNSCache::AddrEntry::~AddrEntry() = default; @@ -61,8 +60,7 @@ DNSCache::CacheEntry::CacheEntry(const std::string& hostname, uint16_t port) { } -DNSCache::CacheEntry::CacheEntry(const CacheEntry& c) - = default; +DNSCache::CacheEntry::CacheEntry(const CacheEntry& c) = default; DNSCache::CacheEntry::~CacheEntry() = default; diff --git a/src/Option.cc b/src/Option.cc index dc5ce58f..fb555bee 100644 --- a/src/Option.cc +++ b/src/Option.cc @@ -48,8 +48,7 @@ Option::Option() Option::~Option() = default; -Option::Option(const Option& option) - = default; +Option::Option(const Option& option) = default; Option& Option::operator=(const Option& option) { diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 725329db..842ae56f 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -344,9 +344,9 @@ std::vector OptionHandlerFactory::createOptionHandlers() handlers.push_back(op); } { - OptionHandler* op(new BooleanOptionHandler( - PREF_SAVE_NOT_FOUND, TEXT_SAVE_NOT_FOUND, A2_V_TRUE, - OptionHandler::OPT_ARG)); + OptionHandler* op(new BooleanOptionHandler(PREF_SAVE_NOT_FOUND, + TEXT_SAVE_NOT_FOUND, A2_V_TRUE, + OptionHandler::OPT_ARG)); op->addTag(TAG_ADVANCED); op->setInitialOption(true); op->setChangeOption(true); diff --git a/src/PeerAddrEntry.cc b/src/PeerAddrEntry.cc index 5591879e..bae4bc0a 100644 --- a/src/PeerAddrEntry.cc +++ b/src/PeerAddrEntry.cc @@ -43,8 +43,7 @@ PeerAddrEntry::PeerAddrEntry(const std::string& ipaddr, uint16_t port, { } -PeerAddrEntry::PeerAddrEntry(const PeerAddrEntry& c) - = default; +PeerAddrEntry::PeerAddrEntry(const PeerAddrEntry& c) = default; PeerAddrEntry::~PeerAddrEntry() = default; diff --git a/src/Range.cc b/src/Range.cc index 3bc03fab..7c0bf3a1 100644 --- a/src/Range.cc +++ b/src/Range.cc @@ -43,8 +43,7 @@ Range::Range(int64_t startByte, int64_t endByte, int64_t entityLength) { } -Range::Range(const Range& c) - = default; +Range::Range(const Range& c) = default; Range::~Range() = default; diff --git a/src/SessionSerializer.cc b/src/SessionSerializer.cc index 88290658..0d260a3f 100644 --- a/src/SessionSerializer.cc +++ b/src/SessionSerializer.cc @@ -279,20 +279,20 @@ bool SessionSerializer::save(IOFile& fp) const for (const auto& dr : results) { auto save = false; switch (dr->result) { - case error_code::FINISHED: - case error_code::REMOVED: - save = dr->option->getAsBool(PREF_FORCE_SAVE); - break; - case error_code::IN_PROGRESS: - save = saveInProgress_; - break; - case error_code::RESOURCE_NOT_FOUND: - case error_code::MAX_FILE_NOT_FOUND: - save = saveError_ && dr->option->getAsBool(PREF_SAVE_NOT_FOUND); - break; - default: - save = saveError_; - break; + case error_code::FINISHED: + case error_code::REMOVED: + save = dr->option->getAsBool(PREF_FORCE_SAVE); + break; + case error_code::IN_PROGRESS: + save = saveInProgress_; + break; + case error_code::RESOURCE_NOT_FOUND: + case error_code::MAX_FILE_NOT_FOUND: + save = saveError_ && dr->option->getAsBool(PREF_SAVE_NOT_FOUND); + break; + default: + save = saveError_; + break; } if (save && !writeDownloadResult(fp, metainfoCache, dr, false)) { return false; diff --git a/src/ValueBaseStructParserStateMachine.cc b/src/ValueBaseStructParserStateMachine.cc index e560bfbf..b026758a 100644 --- a/src/ValueBaseStructParserStateMachine.cc +++ b/src/ValueBaseStructParserStateMachine.cc @@ -66,7 +66,8 @@ ValueBaseStructParserStateMachine::ValueBaseStructParserStateMachine() stateStack_.push(valueState); } -ValueBaseStructParserStateMachine::~ValueBaseStructParserStateMachine() = default; +ValueBaseStructParserStateMachine::~ValueBaseStructParserStateMachine() = + default; void ValueBaseStructParserStateMachine::reset() { diff --git a/src/uri.cc b/src/uri.cc index 77ade701..1241ea2c 100644 --- a/src/uri.cc +++ b/src/uri.cc @@ -45,8 +45,7 @@ UriStruct::UriStruct() : port(0), hasPassword(false), ipv6LiteralAddress(false) { } -UriStruct::UriStruct(const UriStruct& c) - = default; +UriStruct::UriStruct(const UriStruct& c) = default; UriStruct::~UriStruct() = default;