Skip to content
Permalink
Browse files

Fix coverity uninitialized variable warnings

  • Loading branch information
nyalldawson committed May 10, 2016
1 parent 4dde0c3 commit f4b63c68614f8e333ea0f2b7decfb4490855a685
@@ -1033,6 +1033,8 @@ QgisApp::QgisApp()
, mPrevScreenModeMaximized( false )
, mSaveRollbackInProgress( false )
, mPythonUtils( nullptr )
, mUndoWidget( nullptr )
, mUndoDock( nullptr )
, mBrowserWidget( nullptr )
, mBrowserWidget2( nullptr )
, mAdvancedDigitizingDockWidget( nullptr )
@@ -23,6 +23,7 @@ QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QWidget *parent
, mMapCanvas( canvas )
, mBlockAutoApply( false )
, mCurrentLayer( nullptr )
, mVectorStyleWidget( nullptr )
{
QBoxLayout* layout = new QVBoxLayout();
layout->setContentsMargins( 0, 0, 0, 0 );
@@ -31,6 +31,8 @@ originally part of the larger QgsRasterLayer class
QgsColorRampShader::QgsColorRampShader( double theMinimumValue, double theMaximumValue )
: QgsRasterShaderFunction( theMinimumValue, theMaximumValue )
, mColorRampType( INTERPOLATED )
, mLUTOffset( 0.0 )
, mLUTFactor( 1.0 )
, mLUTInitialized( false )
, mClip( false )
{
@@ -78,7 +78,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
/** \brief Get the maximum size the color cache can be
* @deprecated will be removed in QGIS 3.0. Color cache is not used anymore.
*/
Q_DECL_DEPRECATED int maximumColorCacheSize() { return mMaximumColorCacheSize; }
Q_DECL_DEPRECATED int maximumColorCacheSize() { return 0; }

/** \brief Set custom colormap */
void setColorRampItemList( const QList<QgsColorRampShader::ColorRampItem>& theList ); //TODO: sort on set
@@ -92,7 +92,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
/** \brief Set the maximum size the color cache can be
* @deprecated will be removed in QGIS 3.0. Color cache is not used anymore.
*/
Q_DECL_DEPRECATED void setMaximumColorCacheSize( int theSize ) { mMaximumColorCacheSize = theSize; }
Q_DECL_DEPRECATED void setMaximumColorCacheSize( int theSize ) { Q_UNUSED( theSize ); }

/** \brief Generates and new RGB value based on one input value */
bool shade( double, int*, int*, int*, int* ) override;
@@ -131,11 +131,6 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction
double mLUTFactor;
bool mLUTInitialized;

/** Maximum size of the color cache. The color cache could eat a ton of
* memory if you have 32-bit data
* TODO QGIS 3: remove this */
int mMaximumColorCacheSize;

/** Do not render values out of range */
bool mClip;
};

0 comments on commit f4b63c6

Please sign in to comment.
You can’t perform that action at this time.