diff --git a/src/blackmisc/geoearthangle.cpp b/src/blackmisc/geoearthangle.cpp index 456549858..7ddcf9553 100644 --- a/src/blackmisc/geoearthangle.cpp +++ b/src/blackmisc/geoearthangle.cpp @@ -79,9 +79,9 @@ namespace BlackMisc Q_ASSERT(qv.canConvert() || qv.canConvert()); Q_ASSERT(qv.isValid() && !qv.isNull()); if (qv.canConvert()) - return this->toAngle().compare(qv.value().toAngle()); + return this->compare(qv.value()); else - return this->toAngle().compare(qv.value()); + return this->compare(qv.value()); } // see here for the reason of thess forward instantiations diff --git a/src/blackmisc/geoearthangle.h b/src/blackmisc/geoearthangle.h index a2e5284b0..891263f97 100644 --- a/src/blackmisc/geoearthangle.h +++ b/src/blackmisc/geoearthangle.h @@ -175,20 +175,20 @@ namespace BlackMisc return l; } - /*! - * \brief To angle - * \return - */ - BlackMisc::PhysicalQuantities::CAngle toAngle() const - { - return BlackMisc::PhysicalQuantities::CAngle(static_cast(*this)); - } - /*! * Compare */ int compare(const QVariant &qv) const; + /*! + * \todo this is a hack, to avoid hiding inherited names in CPhysicalQuantity + * (see Effective C++ item 33) CPhysicalQuantity::compare is the real culprit + */ + int compare(const CEarthAngle &other) const + { + return static_cast *>(this)->compare(other); + } + /*! * Register metadata */