diff --git a/src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp b/src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp index 51c57133e77a..9982c4f1d325 100644 --- a/src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp +++ b/src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp @@ -508,7 +508,7 @@ bool QgsPointCloudLayerProfileGenerator::generateProfile( const QgsProfileGenera return false; } - for ( QgsPointCloudIndex *pc : indexes ) + for ( QgsPointCloudIndex *pc : std::as_const( indexes ) ) { const IndexedPointCloudNode root = pc->root(); const QgsRectangle rootNodeExtentLayerCoords = pc->nodeMapExtent( root );