summaryrefslogtreecommitdiff
path: root/src/location/places/qplaceicon.cpp
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-05-14 17:06:02 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-15 06:02:53 +0200
commit402f904f8c37e0b14ce07d49aaa391ee2d71de64 (patch)
treef50ba2ebfb4d65d1f61c586f30a3bb8317abbb5d /src/location/places/qplaceicon.cpp
parent08c61718b83f93b2d27871e0e74cce838cc8fbf5 (diff)
downloadqtlocation-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/places/qplaceicon.cpp')
-rw-r--r--src/location/places/qplaceicon.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/location/places/qplaceicon.cpp b/src/location/places/qplaceicon.cpp
index 5fa051b4..8db4dfe0 100644
--- a/src/location/places/qplaceicon.cpp
+++ b/src/location/places/qplaceicon.cpp
@@ -143,6 +143,9 @@ QPlaceIcon::~QPlaceIcon()
*/
QPlaceIcon &QPlaceIcon::operator=(const QPlaceIcon &other)
{
+ if (this == &other)
+ return *this;
+
d = other.d;
return *this;
}