mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
removed operator= and copy ctor from classes where they only duplicated the behaviour of the default implementations that C++ generates automatically
This commit is contained in:
@@ -18,14 +18,6 @@ template <class MU, class PQ> CPhysicalQuantity<MU, PQ>::CPhysicalQuantity(doubl
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy constructor
|
||||
*/
|
||||
template <class MU, class PQ> CPhysicalQuantity<MU, PQ>::CPhysicalQuantity(const CPhysicalQuantity &other) :
|
||||
m_value(other.m_value), m_unit(other.m_unit)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Equal operator ==
|
||||
*/
|
||||
@@ -44,18 +36,6 @@ template <class MU, class PQ> bool CPhysicalQuantity<MU, PQ>::operator !=(const
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
/*
|
||||
* Assignment operator =
|
||||
*/
|
||||
template <class MU, class PQ> CPhysicalQuantity<MU, PQ>& CPhysicalQuantity<MU, PQ>::operator=(const CPhysicalQuantity<MU, PQ> &other)
|
||||
{
|
||||
if (this == &other) return *this;
|
||||
|
||||
this->m_value = other.m_value;
|
||||
this->m_unit = other.m_unit;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*
|
||||
* Plus operator
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user