[Positioning] operator=() return non-const reference

Change the return type of all operator=() from const reference to
non-const reference.
This commit is contained in:
Matteo Cypriani 2011-07-30 20:38:42 +02:00
parent dcf425fce5
commit 141515b5db
30 changed files with 39 additions and 40 deletions

View File

@ -8,7 +8,7 @@ using namespace std ;
/* *** Operators *** */
const AccessPoint& AccessPoint::operator=(const AccessPoint &source)
AccessPoint& AccessPoint::operator=(const AccessPoint &source)
{
if (this == &source)
return *this ;

View File

@ -69,7 +69,7 @@ public:
/** @name Operators */
//@{
const AccessPoint& operator=(const AccessPoint &source) ;
AccessPoint& operator=(const AccessPoint &source) ;
bool operator==(const AccessPoint &source) const ;
bool operator!=(const AccessPoint &source) const ;
//@}

View File

@ -119,7 +119,7 @@ void Area::reorder_coordinates()
/* *** Operators *** */
const Area& Area::operator=(const Area &source)
Area& Area::operator=(const Area &source)
{
if (this == &source)
return *this ;

View File

@ -55,7 +55,7 @@ public:
/** @name Operators */
//@{
const Area& operator=(const Area &source) ;
Area& operator=(const Area &source) ;
bool operator==(const Area &source) const ;
bool operator!=(const Area &source) const ;
//@}

View File

@ -73,7 +73,7 @@ void Building::add_area(Area *&area)
/* *** Operators *** */
const Building& Building::operator=(const Building &source)
Building& Building::operator=(const Building &source)
{
if (this == &source)
return *this ;

View File

@ -48,7 +48,7 @@ public :
/** @name Operators */
//@{
const Building& operator=(const Building &source) ;
Building& operator=(const Building &source) ;
bool operator==(const Building &source) const ;
bool operator!=(const Building &source) const ;
//@}

View File

@ -54,8 +54,8 @@ void CalibrationRequest::clear()
/* *** Operators *** */
const CalibrationRequest&
CalibrationRequest::operator=(const CalibrationRequest &source)
CalibrationRequest& CalibrationRequest::
operator=(const CalibrationRequest &source)
{
if (this == &source)
return *this ;
@ -68,7 +68,8 @@ CalibrationRequest::operator=(const CalibrationRequest &source)
}
bool CalibrationRequest::operator==(const CalibrationRequest &source) const
bool CalibrationRequest::
operator==(const CalibrationRequest &source) const
{
if (this == &source)
return true ;

View File

@ -48,7 +48,7 @@ public:
/** @name Operators */
//@{
const CalibrationRequest& operator=(const CalibrationRequest &source) ;
CalibrationRequest& operator=(const CalibrationRequest &source) ;
bool operator==(const CalibrationRequest &source) const ;
bool operator!=(const CalibrationRequest &source) const ;
//@}

View File

@ -36,14 +36,14 @@ inline bool Direction::is_valid() const
/* *** Operators *** */
const Direction& Direction::operator=(const Direction &source)
Direction& Direction::operator=(const Direction &source)
{
direction = source.direction ;
return *this ;
}
const Direction& Direction::operator=(const char source)
Direction& Direction::operator=(const char source)
{
direction = source ;
assert_valid() ;

View File

@ -27,8 +27,8 @@ public:
/** @name Operators */
//@{
const Direction& operator=(const Direction &source) ;
const Direction& operator=(const char source) ;
Direction& operator=(const Direction &source) ;
Direction& operator=(const char source) ;
bool operator==(const Direction &source) const ;
bool operator!=(const Direction &source) const ;
operator bool(void) const ;

View File

@ -124,7 +124,7 @@ void Measurement::update_average_ss()
/* *** Operators *** */
const Measurement& Measurement::operator=(const Measurement &m)
Measurement& Measurement::operator=(const Measurement &m)
{
if (this == &m)
return *this ;

View File

@ -68,7 +68,7 @@ public:
/** @name Operators */
//@{
const Measurement& operator=(const Measurement &m) ;
Measurement& operator=(const Measurement &m) ;
bool operator==(const Measurement &m) const ;
bool operator!=(const Measurement &m) const ;
operator bool(void) const ;

View File

@ -5,7 +5,7 @@
/* *** Operators *** */
const Mobile& Mobile::operator=(const Mobile &m)
Mobile& Mobile::operator=(const Mobile &m)
{
if (this == &m)
return *this ;

View File

@ -28,7 +28,7 @@ public:
/** @name Operators */
//@{
const Mobile& operator=(const Mobile &m) ;
Mobile& operator=(const Mobile &m) ;
bool operator==(const Mobile &m) const ;
bool operator!=(const Mobile &m) const ;
//@}

View File

@ -93,7 +93,7 @@ double Point3D::angle(const Point3D &b, const Point3D &c) const
/* *** Operators *** */
const Point3D& Point3D::operator=(const Point3D &source)
Point3D& Point3D::operator=(const Point3D &source)
{
if (this == &source)
return *this ;

View File

@ -67,7 +67,7 @@ public:
/** @name Operators */
//@{
const Point3D& operator=(const Point3D &source) ;
Point3D& operator=(const Point3D &source) ;
bool operator==(const Point3D &source) const ;
bool operator!=(const Point3D &source) const ;
bool operator<(const Point3D &source) const ;

View File

@ -272,8 +272,7 @@ float ReferencePoint::friis_indexes_for_ap(
/* *** Operators *** */
const ReferencePoint& ReferencePoint::
operator=(const ReferencePoint &source)
ReferencePoint& ReferencePoint::operator=(const ReferencePoint &source)
{
if (this == &source)
return *this ;

View File

@ -75,7 +75,7 @@ public:
/** @name Operators */
//@{
const ReferencePoint& operator=(const ReferencePoint &source) ;
ReferencePoint& operator=(const ReferencePoint &source) ;
bool operator==(const ReferencePoint &source) const ;
bool operator!=(const ReferencePoint &source) const ;
//@}

View File

@ -79,7 +79,7 @@ float Request::ss_square_distance(const Request &source) const
/* *** Operators *** */
const Request& Request::operator=(const Request &source)
Request& Request::operator=(const Request &source)
{
if (this == &source)
return *this ;

View File

@ -94,7 +94,7 @@ public:
/** @name Operators */
//@{
const Request& operator=(const Request &source) ;
Request& operator=(const Request &source) ;
bool operator==(const Request &comp) const ;
bool operator!=(const Request &comp) const ;
operator bool(void) const ;

View File

@ -50,7 +50,7 @@ void Result::compute_error(const Point3D &real_position)
/* *** Operators *** */
const Result& Result::operator=(const Result &source)
Result& Result::operator=(const Result &source)
{
if (this == &source)
return *this ;

View File

@ -49,7 +49,7 @@ public:
/** @name Operators */
//@{
const Result& operator=(const Result &source) ;
Result& operator=(const Result &source) ;
bool operator==(const Result &source) const ;
bool operator!=(const Result &source) const ;
//@}

View File

@ -21,7 +21,7 @@ ResultList::~ResultList()
/* *** Operators *** */
const ResultList& ResultList::operator=(const ResultList &source)
ResultList& ResultList::operator=(const ResultList &source)
{
if (this == &source)
return *this ;

View File

@ -38,7 +38,7 @@ public:
/** @name Operators */
//@{
const ResultList& operator=(const ResultList &source) ;
ResultList& operator=(const ResultList &source) ;
bool operator==(const ResultList &source) const ;
bool operator!=(const ResultList &source) const ;
//@}

View File

@ -144,7 +144,7 @@ bool Timestamp::greater_than(const struct timespec &source) const
/* *** Operators *** */
const Timestamp& Timestamp::operator=(const Timestamp &source)
Timestamp& Timestamp::operator=(const Timestamp &source)
{
if (this == &source)
return *this ;

View File

@ -62,9 +62,9 @@ public:
/** @name Operators */
//@{
const Timestamp& operator=(const Timestamp &source) ;
const Timestamp& operator=(const struct timespec &source) ;
const Timestamp& operator=(const uint64_t source) ; //< deprecated
Timestamp& operator=(const Timestamp &source) ;
Timestamp& operator=(const struct timespec &source) ;
Timestamp& operator=(const uint64_t source) ; //< deprecated
bool operator==(const Timestamp &source) const ;
bool operator==(const struct timespec &source) const ;
bool operator==(const uint64_t source) const ; //< deprecated
@ -109,15 +109,14 @@ inline void Timestamp::clear(void)
/* *** Operators *** */
inline const Timestamp& Timestamp::
operator=(const struct timespec &source)
inline Timestamp& Timestamp::operator=(const struct timespec &source)
{
set(source) ;
return *this ;
}
inline const Timestamp& Timestamp::operator=(const uint64_t source)
inline Timestamp& Timestamp::operator=(const uint64_t source)
{
set(source) ;
return *this ;

View File

@ -53,7 +53,7 @@ Waypoint::~Waypoint()
/* *** Operators *** */
const Waypoint& Waypoint::operator=(const Waypoint &wp)
Waypoint& Waypoint::operator=(const Waypoint &wp)
{
if (this == &wp)
return *this ;

View File

@ -53,7 +53,7 @@ public:
/** @name Operators */
//@{
const Waypoint& operator=(const Waypoint &wp) ;
Waypoint& operator=(const Waypoint &wp) ;
bool operator==(const Waypoint &wp) const ;
bool operator!=(const Waypoint &wp) const ;
operator std::string(void) const ;

View File

@ -7,7 +7,7 @@ using namespace std ;
/* *** Operators *** */
const WifiDevice& WifiDevice::operator=(const WifiDevice &wd)
WifiDevice& WifiDevice::operator=(const WifiDevice &wd)
{
if (this == &wd)
return *this ;

View File

@ -52,7 +52,7 @@ public:
/** @name Operators */
//@{
const WifiDevice& operator=(const WifiDevice &wd) ;
WifiDevice& operator=(const WifiDevice &wd) ;
bool operator==(const WifiDevice &wd) const ;
bool operator!=(const WifiDevice &wl) const ;
//@}