Skip to content

Commit

Permalink
Fix Coverity uninitialized member warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 11, 2017
1 parent 450887e commit 48c7e31
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/3d/chunks/qgschunkedentity_p.h
Expand Up @@ -103,7 +103,7 @@ class QgsChunkedEntity : public Qt3DCore::QEntity
//! root node of the quadtree hierarchy
QgsChunkNode *mRootNode = nullptr;
//! A chunk has been loaded recently? let's display it!
bool mNeedsUpdate;
bool mNeedsUpdate = false;
//! max. allowed screen space error
float mTau;
//! maximum allowed depth of quad tree
Expand All @@ -117,14 +117,14 @@ class QgsChunkedEntity : public Qt3DCore::QEntity
//! list of nodes that are being currently used for rendering
QList<QgsChunkNode *> mActiveNodes;
//! number of nodes omitted during frustum culling - for the curious ones
int mFrustumCulled;
int mFrustumCulled = 0;

// TODO: max. length for loading queue

QTime mCurrentTime;

//! max. length for replacement queue
int mMaxLoadedChunks;
int mMaxLoadedChunks = 512;

//! Entity that shows bounding boxes of active chunks (null if not enabled)
QgsChunkBoundsEntity *mBboxesEntity = nullptr;
Expand Down
1 change: 0 additions & 1 deletion src/3d/terrain/qgsterraintextureimage_p.cpp
Expand Up @@ -72,7 +72,6 @@ QgsTerrainTextureImage::QgsTerrainTextureImage( const QImage &image, const QgsRe
, mExtent( extent )
, mDebugText( debugText )
, mImage( image )
, mVersion( 1 )
{
}

Expand Down
3 changes: 1 addition & 2 deletions src/3d/terrain/qgsterraintextureimage_p.h
Expand Up @@ -64,8 +64,7 @@ class QgsTerrainTextureImage : public Qt3DRender::QAbstractTextureImage
QgsRectangle mExtent;
QString mDebugText;
QImage mImage;
int mVersion;
int mJobId;
int mVersion = 1;
};

/// @endcond
Expand Down
2 changes: 1 addition & 1 deletion src/3d/terrain/qgsterraintileloader_p.h
Expand Up @@ -63,7 +63,7 @@ class QgsTerrainTileLoader : public QgsChunkLoader
QgsTerrainEntity *mTerrain = nullptr;
QgsRectangle mExtentMapCrs;
QString mTileDebugText;
int mTextureJobId;
int mTextureJobId = -1;
QImage mTextureImage;
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrelation.h
Expand Up @@ -370,7 +370,7 @@ class CORE_EXPORT QgsRelation
//! The parent layer
QgsVectorLayer *mReferencedLayer = nullptr;

RelationStrength mRelationStrength;
RelationStrength mRelationStrength = Association;

/**
* A list of fields which define the relation.
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresfeatureiterator.h
Expand Up @@ -111,7 +111,7 @@ class QgsPostgresFeatureIterator : public QgsAbstractFeatureIteratorFromSource<Q
//! Set to true, if geometry is in the requested columns
bool mFetchGeometry;

bool mIsTransactionConnection;
bool mIsTransactionConnection = false;

virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodType ) const override;

Expand Down
8 changes: 4 additions & 4 deletions src/providers/spatialite/qgsspatialitefeatureiterator.h
Expand Up @@ -90,18 +90,18 @@ class QgsSpatiaLiteFeatureIterator : public QgsAbstractFeatureIteratorFromSource
sqlite3_stmt *sqliteStatement = nullptr;

//! Geometry column index used when fetching geometry
int mGeomColIdx;
int mGeomColIdx = 1;

//! Set to true, if geometry is in the requested columns
bool mFetchGeometry;
bool mFetchGeometry = true;

bool mHasPrimaryKey;
QgsFeatureId mRowNumber;

bool prepareOrderBy( const QList<QgsFeatureRequest::OrderByClause> &orderBys ) override;

bool mOrderByCompiled;
bool mExpressionCompiled;
bool mOrderByCompiled = false;
bool mExpressionCompiled = false;

QgsRectangle mFilterRect;
QgsCoordinateTransform mTransform;
Expand Down

0 comments on commit 48c7e31

Please sign in to comment.