summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2021-10-30 19:04:29 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2021-10-30 19:04:29 +0900
commitc546fa492c752d0594312ee1a2ac8bb4763c40f2 (patch)
tree263fa6dad1c18fd81ce3a0b9bf8ced1b915d8cfe /src
parent177939d6aca9b2c77d8ce526aa22f220de3fefcc (diff)
clang-format-12
Diffstat (limited to 'src')
-rw-r--r--src/AbstractDiskWriter.cc2
-rw-r--r--src/BtLeecherStateChoke.cc8
-rw-r--r--src/BtSeederStateChoke.cc4
-rw-r--r--src/DHTPeerAnnounceStorage.cc6
-rw-r--r--src/DiskAdaptor.h2
-rw-r--r--src/FileEntry.cc6
6 files changed, 14 insertions, 14 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc
index f21c5261..52efc012 100644
--- a/src/AbstractDiskWriter.cc
+++ b/src/AbstractDiskWriter.cc
@@ -597,7 +597,7 @@ void AbstractDiskWriter::flushOSBuffers()
}
#ifdef __MINGW32__
FlushFileBuffers(fd_);
-#else // !__MINGW32__
+#else // !__MINGW32__
fsync(fd_);
#endif // __MINGW32__
}
diff --git a/src/BtLeecherStateChoke.cc b/src/BtLeecherStateChoke.cc
index 7dd2126e..a2a159ac 100644
--- a/src/BtLeecherStateChoke.cc
+++ b/src/BtLeecherStateChoke.cc
@@ -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_;
diff --git a/src/BtSeederStateChoke.cc b/src/BtSeederStateChoke.cc
index e80291a2..0252a696 100644
--- a/src/BtSeederStateChoke.cc
+++ b/src/BtSeederStateChoke.cc
@@ -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_;
diff --git a/src/DHTPeerAnnounceStorage.cc b/src/DHTPeerAnnounceStorage.cc
index 37b4bf82..79465caa 100644
--- a/src/DHTPeerAnnounceStorage.cc
+++ b/src/DHTPeerAnnounceStorage.cc
@@ -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;
}
diff --git a/src/DiskAdaptor.h b/src/DiskAdaptor.h
index 9287b3ec..9ff46792 100644
--- a/src/DiskAdaptor.h
+++ b/src/DiskAdaptor.h
@@ -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)
{
diff --git a/src/FileEntry.cc b/src/FileEntry.cc
index 5e976085..0de16443 100644
--- a/src/FileEntry.cc
+++ b/src/FileEntry.cc
@@ -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;