Skip to content
Permalink
Browse files

Fix Coverity uninitialized member warnings

  • Loading branch information
nyalldawson committed Nov 11, 2017
1 parent 450887e commit 48c7e31ee123f9feafc32ec145694acccd2dccda
@@ -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
@@ -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;
@@ -72,7 +72,6 @@ QgsTerrainTextureImage::QgsTerrainTextureImage( const QImage &image, const QgsRe
, mExtent( extent )
, mDebugText( debugText )
, mImage( image )
, mVersion( 1 )
{
}

@@ -64,8 +64,7 @@ class QgsTerrainTextureImage : public Qt3DRender::QAbstractTextureImage
QgsRectangle mExtent;
QString mDebugText;
QImage mImage;
int mVersion;
int mJobId;
int mVersion = 1;
};

/// @endcond
@@ -63,7 +63,7 @@ class QgsTerrainTileLoader : public QgsChunkLoader
QgsTerrainEntity *mTerrain = nullptr;
QgsRectangle mExtentMapCrs;
QString mTileDebugText;
int mTextureJobId;
int mTextureJobId = -1;
QImage mTextureImage;
};

@@ -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.
@@ -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;

@@ -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;

0 comments on commit 48c7e31

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