mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
First major wave of PQ refactoring, including but not limited to:
* Default unit is more clearly stated in one place, not restated in many different places, and is not always the SI unit * Converter strategy pattern in CMeasurementUnit, covering linear, affine, and different kinds of sexagesimal units * General reorganization of CMeasurementUnit construction and CPhysicalQuantity methods, not removing any behvaiour * Move duplicated method unitFromSymbol from derived classes into base class CMeasurementUnit * For DBus, CPhysicalQuantity marshals both in its own unit and in the default unit
This commit is contained in:
@@ -23,7 +23,7 @@ public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
CSpeed() : CPhysicalQuantity(0, CSpeedUnit::m_s(), CSpeedUnit::m_s()) {}
|
||||
CSpeed() : CPhysicalQuantity(0, CSpeedUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
*\brief Copy constructor from base type
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CPhysicalQuantity(value, unit, CSpeedUnit::m_s()) {}
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
|
||||
Reference in New Issue
Block a user