Skip to content
Permalink
Browse files

Add check for self assignment to the = operator

git-svn-id: http://svn.osgeo.org/qgis/trunk@5100 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman
gsherman committed Mar 26, 2006
1 parent 69a6f68 commit be1e198d1ca34633ff355edde301077df268a649
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/qgsgeometryvertexindex.cpp
@@ -30,7 +30,10 @@ QgsGeometryVertexIndex::QgsGeometryVertexIndex( QgsGeometryVertexIndex const & r

QgsGeometryVertexIndex & QgsGeometryVertexIndex::operator=( QgsGeometryVertexIndex const & rhs )
{
mIndex = rhs.mIndex;
if(&rhs != this)
{
mIndex = rhs.mIndex;
}
return *this;
}

0 comments on commit be1e198

Please sign in to comment.
You can’t perform that action at this time.