mirror of https://github.com/aria2/aria2
clang-format-12
parent
177939d6ac
commit
c546fa492c
|
@ -597,7 +597,7 @@ void AbstractDiskWriter::flushOSBuffers()
|
|||
}
|
||||
#ifdef __MINGW32__
|
||||
FlushFileBuffers(fd_);
|
||||
#else // !__MINGW32__
|
||||
#else // !__MINGW32__
|
||||
fsync(fd_);
|
||||
#endif // __MINGW32__
|
||||
}
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue