- Use "!empty()" instead of "size() > 0" in std::list
- Add comments for namespace brackets
Signed-off-by: Michael Schuster <michael@schuster.ms>
qCDebug(lcBandwidthManager) << "Gave " << quotaPerDevice / 1024.0 << " kB to" << device;
}
}
- if (usingAbsoluteDownloadLimit() && _downloadJobList.size() > 0) {
+ if (usingAbsoluteDownloadLimit() && !_downloadJobList.empty()) {
qint64 quotaPerJob = _currentDownloadLimit / qMax((std::list<GETFileJob *>::size_type)1, _downloadJobList.size());
qCDebug(lcBandwidthManager) << quotaPerJob << _downloadJobList.size() << _currentDownloadLimit;
Q_FOREACH (GETFileJob *j, _downloadJobList) {
}
}
}
-}
+
+} // namespace OCC
qint64 _currentDownloadLimit;
};
-}
+
+} // namespace OCC
#endif