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

@@ -124,7 +124,7 @@ namespace BlackSound
}
}
if (supportedDevices.empty()) { return {}; }
if (supportedDevices.isEmpty()) { return {}; }
QAudioDeviceInfo deviceWithLowestLatency = supportedDevices.at(0);

View File

@@ -57,7 +57,7 @@ namespace BlackSound
const QString &CResourceSound::getFileName() const
{
static const QString empty;
return m_data ? empty : m_data->fileName;
return m_data ? m_data->fileName : empty;
}
bool CResourceSound::isSameFileName(const QString &fn) const

View File

@@ -113,7 +113,7 @@ namespace BlackSound
QByteArray CThreadedTonePairPlayer::getAudioByTonePairs(const QList<CTonePair> &tonePairs)
{
Q_ASSERT(tonePairs.size() > 0);
Q_ASSERT(!tonePairs.isEmpty());
QByteArray finalBufferData;
for (const auto &tonePair : std::as_const(tonePairs))