clang-format-12

pull/1692/merge
Tatsuhiro Tsujikawa 2021-10-30 19:04:29 +09:00
parent 177939d6ac
commit c546fa492c
6 changed files with 14 additions and 14 deletions

View File

@ -597,7 +597,7 @@ void AbstractDiskWriter::flushOSBuffers()
}
#ifdef __MINGW32__
FlushFileBuffers(fd_);
#else // !__MINGW32__
#else // !__MINGW32__
fsync(fd_);
#endif // __MINGW32__
}

View File

@ -72,8 +72,8 @@ void BtLeecherStateChoke::PeerEntry::swap(PeerEntry& c)
swap(regularUnchoker_, c.regularUnchoker_);
}
BtLeecherStateChoke::PeerEntry& BtLeecherStateChoke::PeerEntry::
operator=(const PeerEntry& c)
BtLeecherStateChoke::PeerEntry&
BtLeecherStateChoke::PeerEntry::operator=(const PeerEntry& c)
{
if (this != &c) {
peer_ = c.peer_;
@ -130,8 +130,8 @@ void swap(BtLeecherStateChoke::PeerEntry& a, BtLeecherStateChoke::PeerEntry& b)
a.swap(b);
}
bool BtLeecherStateChoke::PeerFilter::
operator()(const PeerEntry& peerEntry) const
bool BtLeecherStateChoke::PeerFilter::operator()(
const PeerEntry& peerEntry) const
{
return peerEntry.getPeer()->amChoking() == amChoking_ &&
peerEntry.getPeer()->peerInterested() == peerInterested_;

View File

@ -79,8 +79,8 @@ void BtSeederStateChoke::PeerEntry::swap(PeerEntry& c)
swap(uploadSpeed_, c.uploadSpeed_);
}
BtSeederStateChoke::PeerEntry& BtSeederStateChoke::PeerEntry::
operator=(const PeerEntry& c)
BtSeederStateChoke::PeerEntry&
BtSeederStateChoke::PeerEntry::operator=(const PeerEntry& c)
{
if (this != &c) {
peer_ = c.peer_;

View File

@ -57,9 +57,9 @@ DHTPeerAnnounceStorage::DHTPeerAnnounceStorage()
{
}
bool DHTPeerAnnounceStorage::InfoHashLess::
operator()(const std::shared_ptr<DHTPeerAnnounceEntry>& lhs,
const std::shared_ptr<DHTPeerAnnounceEntry>& rhs) const
bool DHTPeerAnnounceStorage::InfoHashLess::operator()(
const std::shared_ptr<DHTPeerAnnounceEntry>& lhs,
const std::shared_ptr<DHTPeerAnnounceEntry>& rhs) const
{
return memcmp(lhs->getInfoHash(), rhs->getInfoHash(), DHT_ID_LENGTH) < 0;
}

View File

@ -115,7 +115,7 @@ public:
virtual void writeCache(const WrDiskCacheEntry* entry) = 0;
// Force physical write of data from OS buffer cache.
virtual void flushOSBuffers() {};
virtual void flushOSBuffers(){};
void setFileAllocationMethod(FileAllocationMethod method)
{

View File

@ -51,9 +51,9 @@
namespace aria2 {
bool FileEntry::RequestFaster::
operator()(const std::shared_ptr<Request>& lhs,
const std::shared_ptr<Request>& rhs) const
bool FileEntry::RequestFaster::operator()(
const std::shared_ptr<Request>& lhs,
const std::shared_ptr<Request>& rhs) const
{
if (!lhs->getPeerStat()) {
return false;