Fix clang-tidy and clazy warnings

This commit is contained in:
Mat Sutcliffe
2021-08-27 16:21:41 +01:00
parent 2aeacf49a7
commit eb6b0ff289
122 changed files with 197 additions and 205 deletions

View File

@@ -53,7 +53,7 @@ namespace BlackCore
void CWeatherManager::appendRequest(const WeatherRequest &request)
{
const qint64 now = QDateTime::currentMSecsSinceEpoch();
if (m_pendingRequests.size() > 0 && m_lastPendingRequestTs > 0)
if (!m_pendingRequests.isEmpty() && m_lastPendingRequestTs > 0)
{
const qint64 pendingMs = now - m_lastPendingRequestTs;
if (pendingMs > 30 * 1000)
@@ -227,7 +227,7 @@ namespace BlackCore
m_pendingRequests.pop_front();
// In case there are pending requests, start over again
if (m_pendingRequests.size() > 0)
if (!m_pendingRequests.isEmpty())
{
fetchNextWeatherData();
}