mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Merged with changes of MS, some similar bug fixes done in parallel
This commit is contained in:
@@ -193,7 +193,7 @@ template <class MU, class PQ> CPhysicalQuantity<MU, PQ> &CPhysicalQuantity<MU, P
|
||||
*/
|
||||
template <class MU, class PQ> PQ CPhysicalQuantity<MU, PQ>::operator -(const PQ &otherQuantity) const
|
||||
{
|
||||
PQ minus = this->clone();
|
||||
PQ minus = *derived();
|
||||
minus -= otherQuantity;
|
||||
return minus;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ template <class MU, class PQ> CPhysicalQuantity<MU, PQ> &CPhysicalQuantity<MU, P
|
||||
*/
|
||||
template <class MU, class PQ> PQ CPhysicalQuantity<MU, PQ>::operator *(double multiply) const
|
||||
{
|
||||
PQ times = this->clone();
|
||||
PQ times = *derived();
|
||||
times *= multiply;
|
||||
return times;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ template <class MU, class PQ> CPhysicalQuantity<MU, PQ> &CPhysicalQuantity<MU, P
|
||||
*/
|
||||
template <class MU, class PQ> PQ CPhysicalQuantity<MU, PQ>::operator /(double divide) const
|
||||
{
|
||||
PQ div = this->clone();
|
||||
PQ div = *derived();
|
||||
div /= divide;
|
||||
return div;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ template <class MU, class PQ> PQ &CPhysicalQuantity<MU, PQ>::switchUnit(const MU
|
||||
this->m_unit = newUnit;
|
||||
this->setUnitValue(cf);
|
||||
}
|
||||
return static_cast<PQ &>(*this);
|
||||
return *derived();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user