From: Michael Schuster Date: Wed, 26 Aug 2020 23:31:06 +0000 (+0200) Subject: Adapt code style in addition to #2300 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~206 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bd519ffe7af01b62bba1526028095d8af5fbf563;p=nextcloud-desktop.git 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 --- 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