From 59a76430dc384b1a1fb06ffd0c0958c64434a2ef Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Dec 2024 08:24:08 +1000 Subject: [PATCH] Fix cppcheck errors --- python/PyQt6/core/auto_generated/raster/qgsrastershader.sip.in | 2 +- python/core/auto_generated/raster/qgsrastershader.sip.in | 2 +- src/core/pointcloud/qgscopcpointcloudindex.cpp | 2 +- src/core/pointcloud/qgscopcpointcloudindex.h | 2 +- src/core/pointcloud/qgspointcloudindex.cpp | 2 +- src/core/pointcloud/qgspointcloudindex.h | 2 +- src/core/raster/qgsrastershader.cpp | 2 +- src/core/raster/qgsrastershader.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/PyQt6/core/auto_generated/raster/qgsrastershader.sip.in b/python/PyQt6/core/auto_generated/raster/qgsrastershader.sip.in index e138616b2b18..03449906e748 100644 --- a/python/PyQt6/core/auto_generated/raster/qgsrastershader.sip.in +++ b/python/PyQt6/core/auto_generated/raster/qgsrastershader.sip.in @@ -50,7 +50,7 @@ Returns the minimum value for the raster shader. int *returnRedValue /Out/, int *returnGreenValue /Out/, int *returnBlueValue /Out/, - int *returnAlpha /Out/ ); + int *returnAlpha /Out/ ) const; %Docstring Generates a new RGBA value based on one input ``value``. diff --git a/python/core/auto_generated/raster/qgsrastershader.sip.in b/python/core/auto_generated/raster/qgsrastershader.sip.in index e138616b2b18..03449906e748 100644 --- a/python/core/auto_generated/raster/qgsrastershader.sip.in +++ b/python/core/auto_generated/raster/qgsrastershader.sip.in @@ -50,7 +50,7 @@ Returns the minimum value for the raster shader. int *returnRedValue /Out/, int *returnGreenValue /Out/, int *returnBlueValue /Out/, - int *returnAlpha /Out/ ); + int *returnAlpha /Out/ ) const; %Docstring Generates a new RGBA value based on one input ``value``. diff --git a/src/core/pointcloud/qgscopcpointcloudindex.cpp b/src/core/pointcloud/qgscopcpointcloudindex.cpp index 227c5d3e4555..f5a8da8b2e25 100644 --- a/src/core/pointcloud/qgscopcpointcloudindex.cpp +++ b/src/core/pointcloud/qgscopcpointcloudindex.cpp @@ -241,7 +241,7 @@ qint64 QgsCopcPointCloudIndex::pointCount() const return mLazInfo->pointCount(); } -bool QgsCopcPointCloudIndex::loadHierarchy() +bool QgsCopcPointCloudIndex::loadHierarchy() const { fetchHierarchyPage( mCopcInfoVlr.root_hier_offset, mCopcInfoVlr.root_hier_size ); return true; diff --git a/src/core/pointcloud/qgscopcpointcloudindex.h b/src/core/pointcloud/qgscopcpointcloudindex.h index a5a9be56306a..172af2cabaf8 100644 --- a/src/core/pointcloud/qgscopcpointcloudindex.h +++ b/src/core/pointcloud/qgscopcpointcloudindex.h @@ -93,7 +93,7 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsPointCloudIndex protected: bool loadSchema( QgsLazInfo &lazInfo ); - bool loadHierarchy(); + bool loadHierarchy() const; //! Fetches all nodes leading to node \a node into memory bool fetchNodeHierarchy( const QgsPointCloudNodeId &n ) const; diff --git a/src/core/pointcloud/qgspointcloudindex.cpp b/src/core/pointcloud/qgspointcloudindex.cpp index 2fd52bb88a19..498da1eda065 100644 --- a/src/core/pointcloud/qgspointcloudindex.cpp +++ b/src/core/pointcloud/qgspointcloudindex.cpp @@ -286,7 +286,7 @@ QgsPointCloudBlock *QgsPointCloudIndex::getNodeDataFromCache( const QgsPointClou return cached ? cached->clone() : nullptr; } -void QgsPointCloudIndex::storeNodeDataToCache( QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request ) +void QgsPointCloudIndex::storeNodeDataToCache( QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request ) const { storeNodeDataToCacheStatic( data, node, request, mFilterExpression, mUri ); } diff --git a/src/core/pointcloud/qgspointcloudindex.h b/src/core/pointcloud/qgspointcloudindex.h index 1a4e62879874..99a0d3668fe6 100644 --- a/src/core/pointcloud/qgspointcloudindex.h +++ b/src/core/pointcloud/qgspointcloudindex.h @@ -342,7 +342,7 @@ class CORE_EXPORT QgsPointCloudIndex /** * Stores existing \a data to the cache for the specified \a node and \a request. Ownership is not transferred, block gets cloned in the cache. */ - void storeNodeDataToCache( QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request ); + void storeNodeDataToCache( QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request ) const; /** * Stores existing \a data to the cache for the specified \a node, \a request, \a expression and \a uri. Ownership is not transferred, block gets cloned in the cache. diff --git a/src/core/raster/qgsrastershader.cpp b/src/core/raster/qgsrastershader.cpp index 6657758433ea..230f6f40940e 100644 --- a/src/core/raster/qgsrastershader.cpp +++ b/src/core/raster/qgsrastershader.cpp @@ -33,7 +33,7 @@ QgsRasterShader::QgsRasterShader( double minimumValue, double maximumValue ) QgsDebugMsgLevel( QStringLiteral( "called." ), 4 ); } -bool QgsRasterShader::shade( double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha ) +bool QgsRasterShader::shade( double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlpha ) const { if ( mRasterShaderFunction ) { diff --git a/src/core/raster/qgsrastershader.h b/src/core/raster/qgsrastershader.h index d4b1a6a69fda..56b50acd5ff1 100644 --- a/src/core/raster/qgsrastershader.h +++ b/src/core/raster/qgsrastershader.h @@ -84,7 +84,7 @@ class CORE_EXPORT QgsRasterShader int *returnRedValue SIP_OUT, int *returnGreenValue SIP_OUT, int *returnBlueValue SIP_OUT, - int *returnAlpha SIP_OUT ); + int *returnAlpha SIP_OUT ) const; /** * Generates a new RGBA value based on an original RGBA value.