diff --git a/src/blackmisc/aviation/selcal.cpp b/src/blackmisc/aviation/selcal.cpp index ad7f7233f..0bac99032 100644 --- a/src/blackmisc/aviation/selcal.cpp +++ b/src/blackmisc/aviation/selcal.cpp @@ -27,23 +27,23 @@ namespace BlackMisc QString CSelcal::convertToQString(bool /** i18n **/) const { - return this->m_code; + return m_code; } bool CSelcal::equalsString(const QString &code) const { if (code.isEmpty()) return false; - return (this->m_code.compare(code, Qt::CaseInsensitive) == 0); + return (m_code.compare(code, Qt::CaseInsensitive) == 0); } QList CSelcal::getFrequencies() const { QList f; - if (!CSelcal::isValidCode(this->m_code)) return f; - f.reserve(this->m_code.length()); - for (int pos = 0; pos < this->m_code.length(); pos++) + if (!CSelcal::isValidCode(m_code)) return f; + f.reserve(m_code.length()); + for (int pos = 0; pos < m_code.length(); pos++) { - f.append(CSelcal::audioFrequencyEquivalent(this->m_code.at(pos))); + f.append(CSelcal::audioFrequencyEquivalent(m_code.at(pos))); } return f; } diff --git a/src/blackmisc/aviation/selcal.h b/src/blackmisc/aviation/selcal.h index 8a1fc7d64..a53d2480a 100644 --- a/src/blackmisc/aviation/selcal.h +++ b/src/blackmisc/aviation/selcal.h @@ -26,7 +26,6 @@ class QStringList; namespace BlackMisc { namespace PhysicalQuantities { class CFrequency; } - namespace Aviation { /*! @@ -50,20 +49,21 @@ namespace BlackMisc CSelcal(const char *code) : m_code(QString(code).trimmed().toUpper()) {} //! Is valid? - bool isValid() const { return isValidCode(this->m_code); } + bool isValid() const { return isValidCode(m_code); } //! Get SELCAL code - const QString &getCode() const { return this->m_code; } + const QString &getCode() const { return m_code; } - /*! - * List of 4 frequencies, if list is empty SELCAL code is not valid - * \return either 4 frequencies, or empty list - */ - QList getFrequencies() const; + //! List of 4 frequencies, if list is empty SELCAL code is not valid + //! \return either 4 frequencies, or empty list + QList getFrequencies() const; //! Equals given string bool equalsString(const QString &code) const; + //! \copydoc BlackMisc::Mixin::String::toQString + QString convertToQString(bool i18n = false) const; + //! Valid SELCAL characters static const QString &validCharacters(); @@ -74,13 +74,11 @@ namespace BlackMisc static bool isValidCode(const QString &code); //! Audio frequency for character - static const BlackMisc::PhysicalQuantities::CFrequency &audioFrequencyEquivalent(QChar c); + static const PhysicalQuantities::CFrequency &audioFrequencyEquivalent(QChar c); //! All valid code pairs: AB, AC, AD ... static const QStringList &codePairs(); - //! \copydoc BlackMisc::Mixin::String::toQString - QString convertToQString(bool i18n = false) const; private: QString m_code;