mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 15:15:39 +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
|
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; }
|
if (*this < other) { return -1; }
|
||||||
else if (*this > other) { return 1; }
|
else if (*this > other) { return 1; }
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator==(const LATorLON &latOrLon) const
|
bool operator==(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator ==(latOrLon);
|
return this->CAngle::operator ==(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator!=(const LATorLON &latOrLon) const
|
bool operator!=(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator !=(latOrLon);
|
return this->CAngle::operator !=(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator >(const LATorLON &latOrLon) const
|
bool operator >(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator >(latOrLon);
|
return this->CAngle::operator >(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator <(const LATorLON &latOrLon) const
|
bool operator <(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator >(latOrLon);
|
return this->CAngle::operator >(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator <=(const LATorLON &latOrLon) const
|
bool operator <=(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator <=(latOrLon);
|
return this->CAngle::operator <=(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool operator >=(const LATorLON &latOrLon) const
|
bool operator >=(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
return this->CAngle::operator >=(latOrLon);
|
return this->CAngle::operator >=(latOrLon);
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
LATorLON operator +(const LATorLON &latOrLon) const
|
LATorLON operator +(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
LATorLON l(*this);
|
LATorLON l(*this);
|
||||||
l += latOrLon;
|
l += latOrLon;
|
||||||
@@ -183,7 +183,7 @@ namespace BlackMisc
|
|||||||
* \param latOrLon
|
* \param latOrLon
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
LATorLON operator -(const LATorLON &latOrLon) const
|
LATorLON operator -(const CEarthAngle &latOrLon) const
|
||||||
{
|
{
|
||||||
LATorLON l(*this);
|
LATorLON l(*this);
|
||||||
l -= latOrLon;
|
l -= latOrLon;
|
||||||
|
|||||||
Reference in New Issue
Block a user