Skip to content
Permalink
Browse files

qgscoordinatereferencesystem_p.h: explicitly initalize various object…

… variables, even if not strictly necessary, to make cppcheck happy
  • Loading branch information
rouault committed Jun 1, 2020
1 parent 693baf0 commit 44a2b0f28822b3ebd32b421b099a2e45ac950a60
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/core/qgscoordinatereferencesystem_p.h
@@ -67,13 +67,18 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
, mSRID( other.mSRID )
, mAuthId( other.mAuthId )
, mIsValid( other.mIsValid )
#if PROJ_VERSION_MAJOR<6
#if PROJ_VERSION_MAJOR >= 6
, mPj()
#else
, mCRS( nullptr )
#endif
, mProj4( other.mProj4 )
, mWktPreferred( other.mWktPreferred )
, mAxisInvertedDirty( other.mAxisInvertedDirty )
, mAxisInverted( other.mAxisInverted )
#if PROJ_VERSION_MAJOR >= 6
, mProjObjects()
#endif
{
#if PROJ_VERSION_MAJOR<6
if ( mIsValid )
@@ -174,7 +179,7 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
}

#else
OGRSpatialReferenceH mCRS;
OGRSpatialReferenceH mCRS = nullptr;
#endif

mutable QString mProj4;
@@ -189,8 +194,8 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData

#if PROJ_VERSION_MAJOR>=6
private:
mutable QReadWriteLock mProjLock;
mutable QMap < PJ_CONTEXT *, PJ * > mProjObjects;
mutable QReadWriteLock mProjLock{};
mutable QMap < PJ_CONTEXT *, PJ * > mProjObjects{};

public:

0 comments on commit 44a2b0f

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