Skip to content

Commit

Permalink
Fix cppcheck uninitMemberVar warnings in src/core/
Browse files Browse the repository at this point in the history
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 ed3e0d9 commit 7af8f8f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/core/diagram/qgsdiagram.cpp
Expand Up @@ -17,9 +17,8 @@


#include <QPainter> #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 // do not copy the cached expression map - the expressions need to be created and prepared with getExpression(...) call
} }


Expand Down
2 changes: 2 additions & 0 deletions src/core/effects/qgsgloweffect.cpp
Expand Up @@ -33,6 +33,8 @@ QgsGlowEffect::QgsGlowEffect( const QgsGlowEffect &other )
, mSpreadUnit( other.spreadUnit() ) , mSpreadUnit( other.spreadUnit() )
, mSpreadMapUnitScale( other.spreadMapUnitScale() ) , mSpreadMapUnitScale( other.spreadMapUnitScale() )
, mBlurLevel( other.blurLevel() ) , mBlurLevel( other.blurLevel() )
, mBlurUnit( other.mBlurUnit )
, mBlurMapUnitScale( other.mBlurMapUnitScale )
, mOpacity( other.opacity() ) , mOpacity( other.opacity() )
, mColor( other.color() ) , mColor( other.color() )
, mBlendMode( other.blendMode() ) , mBlendMode( other.blendMode() )
Expand Down
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressioncontextutils.h
Expand Up @@ -327,7 +327,7 @@ class CORE_EXPORT QgsExpressionContextUtils


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


}; };


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsexpressioncontext.cpp
Expand Up @@ -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 ) ) for ( const QgsExpressionContextScope *scope : qgis::as_const( other.mStack ) )
{ {
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfeaturerequest.cpp
Expand Up @@ -56,7 +56,7 @@ QgsFeatureRequest::QgsFeatureRequest( const QgsExpression &expr, const QgsExpres
{ {
} }


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

0 comments on commit 7af8f8f

Please sign in to comment.