Skip to content
Permalink
Browse files

Fix cppcheck uninitMemberVar warnings in src/core/

Found with
~/cppcheck/cppcheck --enable=all --inconclusive ../src/core --library=$HOME/cppcheck/cfg/qt.cfg -j 8 -DSIP_OUT 2>&1 | grep uninitMemberVar
  • Loading branch information
rouault authored and nyalldawson committed Jan 30, 2020
1 parent 1b88cc3 commit 8c4dc10fa0a24c7e680f943742b1bbff994b84a3
@@ -17,9 +17,8 @@

#include <QPainter>

QgsDiagram::QgsDiagram( const QgsDiagram &other )
QgsDiagram::QgsDiagram( const QgsDiagram & ): mExpressions{}
{
Q_UNUSED( other )
// do not copy the cached expression map - the expressions need to be created and prepared with getExpression(...) call
}

@@ -33,6 +33,8 @@ QgsGlowEffect::QgsGlowEffect( const QgsGlowEffect &other )
, mSpreadUnit( other.spreadUnit() )
, mSpreadMapUnitScale( other.spreadMapUnitScale() )
, mBlurLevel( other.blurLevel() )
, mBlurUnit( other.mBlurUnit )
, mBlurMapUnitScale( other.mBlurMapUnitScale )
, mOpacity( other.opacity() )
, mColor( other.color() )
, mBlendMode( other.blendMode() )
@@ -327,7 +327,7 @@ class CORE_EXPORT QgsExpressionContextUtils

QList< QPointer< QgsMapLayer > > mLayers;
QMap< QPointer< QgsMapLayer >, QPair< double, double > > mScaleBasedVisibilityDetails;
double mScale;
double mScale = 0.0;

};

@@ -298,7 +298,7 @@ class QgsMeshStreamField
QPoint mFieldTopLeftInDeviceCoordinates;
bool mValid = false;
double mMaximumMagnitude = 0;
double mPixelFillingDensity;
double mPixelFillingDensity = 0;
double mMinMagFilter = -1;
double mMaxMagFilter = -1;
const QgsRenderContext &mRenderContext; //keep the renderer context only to know if the renderer is stopped
@@ -237,7 +237,7 @@ QgsExpressionContext::QgsExpressionContext( const QList<QgsExpressionContextScop
{
}

QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext &other )
QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext &other ) : mStack{}
{
for ( const QgsExpressionContextScope *scope : qgis::as_const( other.mStack ) )
{
@@ -56,7 +56,7 @@ QgsFeatureRequest::QgsFeatureRequest( const QgsExpression &expr, const QgsExpres
{
}

QgsFeatureRequest::QgsFeatureRequest( const QgsFeatureRequest &rh )
QgsFeatureRequest::QgsFeatureRequest( const QgsFeatureRequest &rh ): mTransformContext{}
{
operator=( rh );
}

0 comments on commit 8c4dc10

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