diff options
author | Alex Wilson <alex.wilson@nokia.com> | 2012-05-14 17:06:02 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-15 06:02:53 +0200 |
commit | 402f904f8c37e0b14ce07d49aaa391ee2d71de64 (patch) | |
tree | f50ba2ebfb4d65d1f61c586f30a3bb8317abbb5d /src/location/maps/qgeoroutesegment.cpp | |
parent | 08c61718b83f93b2d27871e0e74cce838cc8fbf5 (diff) | |
download | qtlocation-402f904f8c37e0b14ce07d49aaa391ee2d71de64.tar.gz |
Coding style fixes, round #1
In this patch:
* Assignment operators that don't check for self-assignment
* Using const references where possible in function arguments
* Using const refs in the iterator var of a foreach() loop
* Add 'explicit' to constructors taking one parameter
Change-Id: I640fd85c3312851f0d8c10193333efec41232e05
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/maps/qgeoroutesegment.cpp')
-rw-r--r-- | src/location/maps/qgeoroutesegment.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/location/maps/qgeoroutesegment.cpp b/src/location/maps/qgeoroutesegment.cpp index 653dccd1..5264a5ac 100644 --- a/src/location/maps/qgeoroutesegment.cpp +++ b/src/location/maps/qgeoroutesegment.cpp @@ -98,6 +98,9 @@ QGeoRouteSegment::~QGeoRouteSegment() {} */ QGeoRouteSegment& QGeoRouteSegment::operator= (const QGeoRouteSegment & other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } |