mirror of https://github.com/aria2/aria2
clang-format-12
parent
177939d6ac
commit
c546fa492c
|
@ -597,7 +597,7 @@ void AbstractDiskWriter::flushOSBuffers()
|
||||||
}
|
}
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
FlushFileBuffers(fd_);
|
FlushFileBuffers(fd_);
|
||||||
#else // !__MINGW32__
|
#else // !__MINGW32__
|
||||||
fsync(fd_);
|
fsync(fd_);
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,8 @@ void BtLeecherStateChoke::PeerEntry::swap(PeerEntry& c)
|
||||||
swap(regularUnchoker_, c.regularUnchoker_);
|
swap(regularUnchoker_, c.regularUnchoker_);
|
||||||
}
|
}
|
||||||
|
|
||||||
BtLeecherStateChoke::PeerEntry& BtLeecherStateChoke::PeerEntry::
|
BtLeecherStateChoke::PeerEntry&
|
||||||
operator=(const PeerEntry& c)
|
BtLeecherStateChoke::PeerEntry::operator=(const PeerEntry& c)
|
||||||
{
|
{
|
||||||
if (this != &c) {
|
if (this != &c) {
|
||||||
peer_ = c.peer_;
|
peer_ = c.peer_;
|
||||||
|
@ -130,8 +130,8 @@ void swap(BtLeecherStateChoke::PeerEntry& a, BtLeecherStateChoke::PeerEntry& b)
|
||||||
a.swap(b);
|
a.swap(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BtLeecherStateChoke::PeerFilter::
|
bool BtLeecherStateChoke::PeerFilter::operator()(
|
||||||
operator()(const PeerEntry& peerEntry) const
|
const PeerEntry& peerEntry) const
|
||||||
{
|
{
|
||||||
return peerEntry.getPeer()->amChoking() == amChoking_ &&
|
return peerEntry.getPeer()->amChoking() == amChoking_ &&
|
||||||
peerEntry.getPeer()->peerInterested() == peerInterested_;
|
peerEntry.getPeer()->peerInterested() == peerInterested_;
|
||||||
|
|
|
@ -79,8 +79,8 @@ void BtSeederStateChoke::PeerEntry::swap(PeerEntry& c)
|
||||||
swap(uploadSpeed_, c.uploadSpeed_);
|
swap(uploadSpeed_, c.uploadSpeed_);
|
||||||
}
|
}
|
||||||
|
|
||||||
BtSeederStateChoke::PeerEntry& BtSeederStateChoke::PeerEntry::
|
BtSeederStateChoke::PeerEntry&
|
||||||
operator=(const PeerEntry& c)
|
BtSeederStateChoke::PeerEntry::operator=(const PeerEntry& c)
|
||||||
{
|
{
|
||||||
if (this != &c) {
|
if (this != &c) {
|
||||||
peer_ = c.peer_;
|
peer_ = c.peer_;
|
||||||
|
|
|
@ -57,9 +57,9 @@ DHTPeerAnnounceStorage::DHTPeerAnnounceStorage()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DHTPeerAnnounceStorage::InfoHashLess::
|
bool DHTPeerAnnounceStorage::InfoHashLess::operator()(
|
||||||
operator()(const std::shared_ptr<DHTPeerAnnounceEntry>& lhs,
|
const std::shared_ptr<DHTPeerAnnounceEntry>& lhs,
|
||||||
const std::shared_ptr<DHTPeerAnnounceEntry>& rhs) const
|
const std::shared_ptr<DHTPeerAnnounceEntry>& rhs) const
|
||||||
{
|
{
|
||||||
return memcmp(lhs->getInfoHash(), rhs->getInfoHash(), DHT_ID_LENGTH) < 0;
|
return memcmp(lhs->getInfoHash(), rhs->getInfoHash(), DHT_ID_LENGTH) < 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ public:
|
||||||
virtual void writeCache(const WrDiskCacheEntry* entry) = 0;
|
virtual void writeCache(const WrDiskCacheEntry* entry) = 0;
|
||||||
|
|
||||||
// Force physical write of data from OS buffer cache.
|
// Force physical write of data from OS buffer cache.
|
||||||
virtual void flushOSBuffers() {};
|
virtual void flushOSBuffers(){};
|
||||||
|
|
||||||
void setFileAllocationMethod(FileAllocationMethod method)
|
void setFileAllocationMethod(FileAllocationMethod method)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
bool FileEntry::RequestFaster::
|
bool FileEntry::RequestFaster::operator()(
|
||||||
operator()(const std::shared_ptr<Request>& lhs,
|
const std::shared_ptr<Request>& lhs,
|
||||||
const std::shared_ptr<Request>& rhs) const
|
const std::shared_ptr<Request>& rhs) const
|
||||||
{
|
{
|
||||||
if (!lhs->getPeerStat()) {
|
if (!lhs->getPeerStat()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue