QgsGeometry::Change operator== should be const

This commit is contained in:
Nyall Dawson 2021-07-20 13:04:39 +10:00
parent ec8943fe4b
commit c2e1ea3b39
2 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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 );
}
};
/**