Add missing const

This commit is contained in:
Nyall Dawson 2019-10-28 09:36:04 +10:00
parent e8b8867c50
commit 2a7f9c32c7
3 changed files with 6 additions and 6 deletions

View File

@ -1466,7 +1466,7 @@ Returns an extruded version of this geometry.
%End
SIP_PYOBJECT randomPointsInPolygon( int count, unsigned long seed = 0 ) /TypeHint="QgsPolylineXY"/;
SIP_PYOBJECT randomPointsInPolygon( int count, unsigned long seed = 0 ) const /TypeHint="QgsPolylineXY"/;
%Docstring
Returns a list of ``count`` random points generated inside a (multi)polygon geometry.

View File

@ -2330,7 +2330,7 @@ QgsGeometry QgsGeometry::extrude( double x, double y )
}
///@cond PRIVATE // avoid dox warning
QVector<QgsPointXY> QgsGeometry::randomPointsInPolygon( int count, const std::function< bool( const QgsPointXY & ) > &acceptPoint, unsigned long seed, QgsFeedback *feedback )
QVector<QgsPointXY> QgsGeometry::randomPointsInPolygon( int count, const std::function< bool( const QgsPointXY & ) > &acceptPoint, unsigned long seed, QgsFeedback *feedback ) const
{
if ( type() != QgsWkbTypes::PolygonGeometry )
return QVector< QgsPointXY >();
@ -2338,7 +2338,7 @@ QVector<QgsPointXY> QgsGeometry::randomPointsInPolygon( int count, const std::fu
return QgsInternalGeometryEngine::randomPointsInPolygon( *this, count, acceptPoint, seed, feedback );
}
QVector<QgsPointXY> QgsGeometry::randomPointsInPolygon( int count, unsigned long seed, QgsFeedback *feedback )
QVector<QgsPointXY> QgsGeometry::randomPointsInPolygon( int count, unsigned long seed, QgsFeedback *feedback ) const
{
if ( type() != QgsWkbTypes::PolygonGeometry )
return QVector< QgsPointXY >();

View File

@ -1466,7 +1466,7 @@ class CORE_EXPORT QgsGeometry
*
* \since QGIS 3.10
*/
QVector< QgsPointXY > randomPointsInPolygon( int count, const std::function< bool( const QgsPointXY & ) > &acceptPoint, unsigned long seed = 0, QgsFeedback *feedback = nullptr );
QVector< QgsPointXY > randomPointsInPolygon( int count, const std::function< bool( const QgsPointXY & ) > &acceptPoint, unsigned long seed = 0, QgsFeedback *feedback = nullptr ) const;
/**
* Returns a list of \a count random points generated inside a (multi)polygon geometry.
@ -1481,7 +1481,7 @@ class CORE_EXPORT QgsGeometry
*
* \since QGIS 3.10
*/
QVector< QgsPointXY > randomPointsInPolygon( int count, unsigned long seed = 0, QgsFeedback *feedback = nullptr );
QVector< QgsPointXY > randomPointsInPolygon( int count, unsigned long seed = 0, QgsFeedback *feedback = nullptr ) const;
///@cond PRIVATE
#else
@ -1497,7 +1497,7 @@ class CORE_EXPORT QgsGeometry
*
* \since QGIS 3.10
*/
SIP_PYOBJECT randomPointsInPolygon( int count, unsigned long seed = 0 ) SIP_TYPEHINT( QgsPolylineXY );
SIP_PYOBJECT randomPointsInPolygon( int count, unsigned long seed = 0 ) const SIP_TYPEHINT( QgsPolylineXY );
% MethodCode
const QgsWkbTypes::GeometryType type = sipCpp->type();
if ( sipCpp->isNull() )