mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Normalizing argument types of CEarthAngle comparison and arithmetic operators:
argument type should be same type as the this pointer.
This commit is contained in:
@@ -94,7 +94,7 @@ namespace BlackMisc
|
||||
*/
|
||||
template <class LATorLON> int CEarthAngle<LATorLON>::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const LATorLON &>(otherBase);
|
||||
const auto &other = static_cast<const CEarthAngle &>(otherBase);
|
||||
|
||||
if (*this < other) { return -1; }
|
||||
else if (*this > other) { return 1; }
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator==(const LATorLON &latOrLon) const
|
||||
bool operator==(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator ==(latOrLon);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator!=(const LATorLON &latOrLon) const
|
||||
bool operator!=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator !=(latOrLon);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator >(const LATorLON &latOrLon) const
|
||||
bool operator >(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator >(latOrLon);
|
||||
}
|
||||
@@ -141,7 +141,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator <(const LATorLON &latOrLon) const
|
||||
bool operator <(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator >(latOrLon);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator <=(const LATorLON &latOrLon) const
|
||||
bool operator <=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator <=(latOrLon);
|
||||
}
|
||||
@@ -161,7 +161,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
bool operator >=(const LATorLON &latOrLon) const
|
||||
bool operator >=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator >=(latOrLon);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
LATorLON operator +(const LATorLON &latOrLon) const
|
||||
LATorLON operator +(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
LATorLON l(*this);
|
||||
l += latOrLon;
|
||||
@@ -183,7 +183,7 @@ namespace BlackMisc
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
LATorLON operator -(const LATorLON &latOrLon) const
|
||||
LATorLON operator -(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
LATorLON l(*this);
|
||||
l -= latOrLon;
|
||||
|
||||
Reference in New Issue
Block a user