Skip to content

Commit

Permalink
Provide operator==
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 8, 2020
1 parent 154f17d commit 7f0ac91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/geometry/qgsabstractgeometry.cpp
Expand Up @@ -536,3 +536,8 @@ const QgsAbstractGeometry *QgsGeometryConstPartIterator::next()
n = i++;
return *n;
}

bool QgsAbstractGeometry::vertex_iterator::Level::operator==( const QgsAbstractGeometry::vertex_iterator::Level &other ) const
{
return g == other.g && index == other.index;
}
2 changes: 2 additions & 0 deletions src/core/geometry/qgsabstractgeometry.h
Expand Up @@ -854,6 +854,8 @@ class CORE_EXPORT QgsAbstractGeometry
{
const QgsAbstractGeometry *g = nullptr; //!< Current geometry
int index = 0; //!< Ptr in the current geometry

bool operator==( const Level &other ) const;
};

std::array<Level, 3> levels; //!< Stack of levels - three levels should be sufficient (e.g. part index, ring index, vertex index)
Expand Down

0 comments on commit 7f0ac91

Please sign in to comment.