From bd519ffe7af01b62bba1526028095d8af5fbf563 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Thu, 27 Aug 2020 01:31:06 +0200 Subject: [PATCH] Adapt code style in addition to #2300 - Use "!empty()" instead of "size() > 0" in std::list - Add comments for namespace brackets Signed-off-by: Michael Schuster --- src/libsync/bandwidthmanager.cpp | 5 +++-- src/libsync/bandwidthmanager.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libsync/bandwidthmanager.cpp b/src/libsync/bandwidthmanager.cpp index cd643ced8..79b19057f 100644 --- a/src/libsync/bandwidthmanager.cpp +++ b/src/libsync/bandwidthmanager.cpp @@ -383,7 +383,7 @@ void BandwidthManager::absoluteLimitTimerExpired() qCDebug(lcBandwidthManager) << "Gave " << quotaPerDevice / 1024.0 << " kB to" << device; } } - if (usingAbsoluteDownloadLimit() && _downloadJobList.size() > 0) { + if (usingAbsoluteDownloadLimit() && !_downloadJobList.empty()) { qint64 quotaPerJob = _currentDownloadLimit / qMax((std::list::size_type)1, _downloadJobList.size()); qCDebug(lcBandwidthManager) << quotaPerJob << _downloadJobList.size() << _currentDownloadLimit; Q_FOREACH (GETFileJob *j, _downloadJobList) { @@ -392,4 +392,5 @@ void BandwidthManager::absoluteLimitTimerExpired() } } } -} + +} // namespace OCC diff --git a/src/libsync/bandwidthmanager.h b/src/libsync/bandwidthmanager.h index 15d949fbc..43b4a36b9 100644 --- a/src/libsync/bandwidthmanager.h +++ b/src/libsync/bandwidthmanager.h @@ -100,6 +100,7 @@ private: qint64 _currentDownloadLimit; }; -} + +} // namespace OCC #endif -- 2.30.2