fix: Supress false positives

This commit is contained in:
Lars Toenning
2025-11-01 00:53:14 +01:00
parent 707eaf0495
commit d23b684b99
5 changed files with 5 additions and 6 deletions

View File

@@ -216,7 +216,7 @@ namespace swift::misc::aviation
// in same step get numeric value only // in same step get numeric value only
bool beforeDigit = true; bool beforeDigit = true;
QString numericPart; QString numericPart;
for (int i = 0; i < v.length(); i++) for (int i = 0; i < v.length(); i++) // NOLINT
{ {
const QChar c = v[i]; const QChar c = v[i];
if (c.isDigit()) if (c.isDigit())

View File

@@ -39,7 +39,7 @@ namespace swift::misc::aviation
QList<CFrequency> f; QList<CFrequency> f;
if (!CSelcal::isValidCode(m_code)) return f; if (!CSelcal::isValidCode(m_code)) return f;
f.reserve(m_code.length()); f.reserve(m_code.length());
for (int pos = 0; pos < m_code.length(); pos++) { f.append(CSelcal::audioFrequencyEquivalent(m_code.at(pos))); } for (const QChar c : m_code) { f.append(CSelcal::audioFrequencyEquivalent(c)); }
return f; return f;
} }

View File

@@ -40,7 +40,7 @@ namespace swift::misc
private: private:
//! Constructor, only static methods //! Constructor, only static methods
CBcdConversions() {} CBcdConversions() {} // NOLINT(modernize-use-equals-default)
//! Horner scheme //! Horner scheme
static quint32 hornerScheme(quint32 num, quint32 divider, quint32 factor); static quint32 hornerScheme(quint32 num, quint32 divider, quint32 factor);

View File

@@ -118,7 +118,7 @@ namespace swift::misc::simulation
protected: protected:
//! Default constructor //! Default constructor
CInterpolationSetupAware() {} CInterpolationSetupAware() {} // NOLINT(modernize-use-equals-default)
//! Constructor //! Constructor
CInterpolationSetupAware(IInterpolationSetupProvider *setupProvider) : IProviderAware(setupProvider) {} CInterpolationSetupAware(IInterpolationSetupProvider *setupProvider) : IProviderAware(setupProvider) {}

View File

@@ -498,8 +498,7 @@ namespace swift::misc
bool CVariant::isA(int metaTypeId) const bool CVariant::isA(int metaTypeId) const
{ {
if (metaTypeId == QMetaType::UnknownType) { return false; } if (metaTypeId == QMetaType::UnknownType) { return false; }
if (metaTypeId == getMetaTypeId()) { return true; } return metaTypeId == getMetaTypeId();
return false;
} }
bool CVariant::matches(const CVariant &value) const bool CVariant::matches(const CVariant &value) const