Skip to content

Commit

Permalink
Fix coverity uninitialized variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 11, 2016
1 parent 4dde0c3 commit f4b63c6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -1033,6 +1033,8 @@ QgisApp::QgisApp()
, mPrevScreenModeMaximized( false )
, mSaveRollbackInProgress( false )
, mPythonUtils( nullptr )
, mUndoWidget( nullptr )
, mUndoDock( nullptr )
, mBrowserWidget( nullptr )
, mBrowserWidget2( nullptr )
, mAdvancedDigitizingDockWidget( nullptr )
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmapstylingwidget.cpp
Expand Up @@ -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 );
Expand Down
2 changes: 2 additions & 0 deletions src/core/raster/qgscolorrampshader.cpp
Expand Up @@ -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 )
{
Expand Down
9 changes: 2 additions & 7 deletions src/core/raster/qgscolorrampshader.h
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit f4b63c6

Please sign in to comment.