Skip to content
Permalink
Browse files
QgsGeometry::Change operator== should be const
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent ec8943f commit c2e1ea3b3931a48146c34e3a5b5f42540b2230e5
@@ -133,7 +133,9 @@ Create a new Change

QgsVertexId vidx;

bool operator==( const QgsGeometryCheck::Change &other );
bool operator==( const QgsGeometryCheck::Change &other ) const;

bool operator!=( const QgsGeometryCheck::Change &other ) const;
};

typedef QMap<QString, QMap<QgsFeatureId, QList<QgsGeometryCheck::Change> > > Changes;
@@ -202,10 +202,15 @@ class ANALYSIS_EXPORT QgsGeometryCheck
QgsVertexId vidx;

// TODO c++20 - replace with = default
bool operator==( const QgsGeometryCheck::Change &other )
bool operator==( const QgsGeometryCheck::Change &other ) const
{
return what == other.what && type == other.type && vidx == other.vidx;
}

bool operator!=( const QgsGeometryCheck::Change &other ) const
{
return !( *this == other );
}
};

/**

0 comments on commit c2e1ea3

Please sign in to comment.