From 593296949c34bf73c63a9a505d50155daddf8258 Mon Sep 17 00:00:00 2001 From: Piers Titus van der Torren Date: Wed, 27 Apr 2016 03:33:21 +0200 Subject: [PATCH] Fix sign of safety correction --- src/core/raster/qgscolorrampshader.cpp | 2 +- src/core/raster/qgscolorrampshader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/raster/qgscolorrampshader.cpp b/src/core/raster/qgscolorrampshader.cpp index b389a993f784..f87691c536f3 100644 --- a/src/core/raster/qgscolorrampshader.cpp +++ b/src/core/raster/qgscolorrampshader.cpp @@ -100,7 +100,7 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th if ( rangeValue > 0 ) { int lutSize = 256; // TODO: test if speed can be increased with a different LUT size - mLUTFactor = ( lutSize + 0.0000001 ) / rangeValue; // increase slightly to make sure last LUT category is correct + mLUTFactor = ( lutSize - 0.0000001 ) / rangeValue; // decrease slightly to make sure last LUT category is correct idx = 0; double val; mLUT.reserve( lutSize ); diff --git a/src/core/raster/qgscolorrampshader.h b/src/core/raster/qgscolorrampshader.h index e24592ddc1ca..d93458f939c1 100644 --- a/src/core/raster/qgscolorrampshader.h +++ b/src/core/raster/qgscolorrampshader.h @@ -130,7 +130,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction /** Maximum size of the color cache. The color cache could eat a ton of * memory if you have 32-bit data * @deprecated will be removed in QGIS 3.0 */ - Q_DECL_DEPRECATED int mMaximumColorCacheSize; + int mMaximumColorCacheSize; /** Do not render values out of range */ bool mClip;