Skip to content

Commit

Permalink
Fix sign of safety correction
Browse files Browse the repository at this point in the history
  • Loading branch information
pierstitus committed Apr 27, 2016
1 parent 208a14e commit 5932969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/raster/qgscolorrampshader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgscolorrampshader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5932969

Please sign in to comment.