Skip to content
Permalink
Browse files

Allow qgsgeometry_cast-ing const geometries

  • Loading branch information
m-kuhn committed Aug 13, 2017
1 parent dba8cc0 commit 59f270ab6b2049d45912a43cb9a5d808b5d33d77
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/geometry/qgsmulticurve.h
  2. +1 −1 src/core/geometry/qgsmultisurface.h
  3. +1 −1 src/core/geometry/qgstriangle.h
@@ -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;
@@ -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;
@@ -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 );

0 comments on commit 59f270a

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