mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
style fixes: mostly just things that make my eyes bleed :)
This commit is contained in:
@@ -39,14 +39,12 @@ class ICoordinateGeodetic
|
||||
*/
|
||||
class CCoordinateGeodetic : public CBaseStreamStringifier, public ICoordinateGeodetic
|
||||
{
|
||||
|
||||
private:
|
||||
BlackMisc::Geo::CLatitude m_latitude; //!< Latitude
|
||||
BlackMisc::Geo::CLongitude m_longitude; //!< Longitude
|
||||
BlackMisc::PhysicalQuantities::CLength m_height; //!< height
|
||||
|
||||
protected:
|
||||
|
||||
/*!
|
||||
* \brief String for converter
|
||||
* \param i18n
|
||||
@@ -132,7 +130,7 @@ public:
|
||||
{
|
||||
this->m_latitude.switchUnit(unit);
|
||||
this->m_longitude.switchUnit(unit);
|
||||
return (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -143,14 +141,14 @@ public:
|
||||
CCoordinateGeodetic &switchUnit(const BlackMisc::PhysicalQuantities::CLengthUnit &unit)
|
||||
{
|
||||
this->m_height.switchUnit(unit);
|
||||
return (*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set latitude
|
||||
* \param latitude
|
||||
*/
|
||||
void setLatitude(CLatitude latitude)
|
||||
void setLatitude(const CLatitude &latitude)
|
||||
{
|
||||
this->m_latitude = latitude;
|
||||
}
|
||||
@@ -159,7 +157,7 @@ public:
|
||||
* \brief Set longitude
|
||||
* \param longitude
|
||||
*/
|
||||
void setLongitude(CLongitude longitude)
|
||||
void setLongitude(const CLongitude &longitude)
|
||||
{
|
||||
this->m_longitude = longitude;
|
||||
}
|
||||
@@ -168,58 +166,57 @@ public:
|
||||
* \brief Set height
|
||||
* \param height
|
||||
*/
|
||||
void setHeight(BlackMisc::PhysicalQuantities::CLength height)
|
||||
void setHeight(const BlackMisc::PhysicalQuantities::CLength &height)
|
||||
{
|
||||
this->m_height = height;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Equal operator ==
|
||||
* \param otherGeodetic
|
||||
* \param other
|
||||
* \return
|
||||
*/
|
||||
bool operator ==(const CCoordinateGeodetic &otherGeodetic) const
|
||||
bool operator ==(const CCoordinateGeodetic &other) const
|
||||
{
|
||||
if (this == &otherGeodetic) return true;
|
||||
return this->m_height == otherGeodetic.m_height &&
|
||||
this->m_latitude == otherGeodetic.m_latitude &&
|
||||
this->m_longitude == otherGeodetic.m_longitude;
|
||||
if (this == &other) return true;
|
||||
return this->m_height == other.m_height &&
|
||||
this->m_latitude == other.m_latitude &&
|
||||
this->m_longitude == other.m_longitude;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Unequal operator !=
|
||||
* \param otherGeodetic
|
||||
* \param other
|
||||
* \return
|
||||
*/
|
||||
bool operator !=(const CCoordinateGeodetic &otherGeodetic) const
|
||||
bool operator !=(const CCoordinateGeodetic &other) const
|
||||
{
|
||||
if (this == &otherGeodetic) return false;
|
||||
return !((*this) == otherGeodetic);
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Assigment operator =
|
||||
* \param otherGeodetic
|
||||
* \param other
|
||||
* \return
|
||||
*/
|
||||
CCoordinateGeodetic &operator =(const CCoordinateGeodetic &otherGeodetic)
|
||||
CCoordinateGeodetic &operator =(const CCoordinateGeodetic &other)
|
||||
{
|
||||
if (this == &otherGeodetic) return *this; // Same object?
|
||||
this->m_height = otherGeodetic.m_height;
|
||||
this->m_latitude = otherGeodetic.m_latitude;
|
||||
this->m_longitude = otherGeodetic.m_longitude;
|
||||
return (*this);
|
||||
if (this == &other) return *this;
|
||||
this->m_height = other.m_height;
|
||||
this->m_latitude = other.m_latitude;
|
||||
this->m_longitude = other.m_longitude;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
static void registerMetadata();
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Geo::CCoordinateGeodetic)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user