mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
Removed CEarthAngle::toAngle, because implicit conversion already works.
Applied a different workaround to resolve the hiding of an inherited name in CEarthAngle, same as was done in CAltitude. refs #84
This commit is contained in:
@@ -175,20 +175,20 @@ namespace BlackMisc
|
||||
return l;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief To angle
|
||||
* \return
|
||||
*/
|
||||
BlackMisc::PhysicalQuantities::CAngle toAngle() const
|
||||
{
|
||||
return BlackMisc::PhysicalQuantities::CAngle(static_cast<BlackMisc::PhysicalQuantities::CAngle>(*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<const CPhysicalQuantity<BlackMisc::PhysicalQuantities::CAngleUnit, BlackMisc::PhysicalQuantities::CAngle> *>(this)->compare(other);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Register metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user