Navigation Menu

Skip to content

Commit

Permalink
Silence some false-positive cppcheck warnings, add explanation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 17, 2023
1 parent 06aded9 commit 477a647
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/mesh/qgsmeshtracerenderer.cpp
Expand Up @@ -249,6 +249,7 @@ QgsMeshStreamField::QgsMeshStreamField( const QgsMeshStreamField &other )
, mPen( other.mPen )
, mTraceImage( other.mTraceImage )
, mMapToFieldPixel( other.mMapToFieldPixel )
, mOutputExtent( other.mOutputExtent )
, mVectorColoring( other.mVectorColoring )
, mDirectionField( other.mDirectionField )
, mRenderContext( other.mRenderContext )
Expand All @@ -261,6 +262,7 @@ QgsMeshStreamField::QgsMeshStreamField( const QgsMeshStreamField &other )
, mMaximumMagnitude( other.mMaximumMagnitude )
, mPixelFillingDensity( other.mPixelFillingDensity )
, mMinMagFilter( other.mMinMagFilter )
, mMaxMagFilter( other.mMaxMagFilter )
, mMinimizeFieldSize( other.mMinimizeFieldSize )
{
mPainter.reset( new QPainter( &mTraceImage ) );
Expand Down Expand Up @@ -1136,9 +1138,11 @@ QgsMeshParticleTracesField::QgsMeshParticleTracesField( const QgsMeshParticleTra
, mParticlesLifeTime( other.mParticlesLifeTime )
, mParticlesCount( other.mParticlesCount )
, mTailFactor( other.mTailFactor )
, mMinTailLength( other.mMinTailLength )
, mParticleColor( other.mParticleColor )
, mParticleSize( other.mParticleSize )
, mStumpFactor( other.mStumpFactor )
, mStumpParticleWithLifeTime( other.mStumpParticleWithLifeTime )
{}

void QgsMeshParticleTracesField::addParticle( const QPoint &startPoint, double lifeTime )
Expand Down
2 changes: 2 additions & 0 deletions src/core/proj/qgscoordinatereferencesystem_p.h
Expand Up @@ -62,10 +62,12 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
, mIsValid( other.mIsValid )
, mCoordinateEpoch( other.mCoordinateEpoch )
, mPj()
, mPjParentContext( nullptr )
, mProj4( other.mProj4 )
, mWktPreferred( other.mWktPreferred )
, mAxisInvertedDirty( other.mAxisInvertedDirty )
, mAxisInverted( other.mAxisInverted )
, mProjLock{}
, mProjObjects()
{
}
Expand Down
7 changes: 7 additions & 0 deletions src/core/proj/qgscoordinatetransform.cpp
Expand Up @@ -150,6 +150,13 @@ QgsCoordinateTransform::QgsCoordinateTransform( const QgsCoordinateTransform &o
, mHasContext( o.mHasContext )
#endif
, mLastError()
// none of these should be copied -- they must be set manually for every object instead, or
// we risk contaminating the cache and copies retrieved from cache with settings which should NOT
// be applied to all transforms
, mIgnoreImpossible( false )
, mBallparkTransformsAreAppropriate( false )
, mDisableFallbackHandler( false )
, mFallbackOperationOccurred( false )
{
d = o.d;
}
Expand Down
1 change: 1 addition & 0 deletions src/core/proj/qgscoordinatetransformcontext_p.h
Expand Up @@ -49,6 +49,7 @@ class QgsCoordinateTransformContextPrivate : public QSharedData

QgsCoordinateTransformContextPrivate( const QgsCoordinateTransformContextPrivate &other )
: QSharedData( other )
, mLock{}
{
other.mLock.lockForRead();
mSourceDestDatumTransforms = other.mSourceDestDatumTransforms;
Expand Down

0 comments on commit 477a647

Please sign in to comment.