Skip to content

Commit

Permalink
Allow qgsgeometry_cast-ing const geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 13, 2017
1 parent dba8cc0 commit 59f270a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsmulticurve.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class CORE_EXPORT QgsMultiCurve: public QgsGeometryCollection
* \note Not available in Python. Objects will be automatically be converted to the appropriate target type.
* \since QGIS 3.0
*/
inline const QgsMultiCurve *cast( const QgsAbstractGeometry *geom )
inline const QgsMultiCurve *cast( const QgsAbstractGeometry *geom ) const
{
if ( !geom )
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsmultisurface.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CORE_EXPORT QgsMultiSurface: public QgsGeometryCollection
* \note Not available in Python. Objects will be automatically be converted to the appropriate target type.
* \since QGIS 3.0
*/
inline const QgsMultiSurface *cast( const QgsAbstractGeometry *geom )
inline const QgsMultiSurface *cast( const QgsAbstractGeometry *geom ) const
{
if ( !geom )
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgstriangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class CORE_EXPORT QgsTriangle : public QgsPolygonV2
* \note Not available in Python. Objects will be automatically be converted to the appropriate target type.
* \since QGIS 3.0
*/
inline const QgsTriangle *cast( const QgsAbstractGeometry *geom )
inline const QgsTriangle *cast( const QgsAbstractGeometry *geom ) const
{
if ( geom && QgsWkbTypes::flatType( geom->wkbType() ) == QgsWkbTypes::Triangle )
return static_cast<const QgsTriangle *>( geom );
Expand Down

0 comments on commit 59f270a

Please sign in to comment.