diff --git a/src/core/painting/qgsgeometrypaintdevice.cpp b/src/core/painting/qgsgeometrypaintdevice.cpp index 9d343b0a3a42..44d213daf017 100644 --- a/src/core/painting/qgsgeometrypaintdevice.cpp +++ b/src/core/painting/qgsgeometrypaintdevice.cpp @@ -502,10 +502,10 @@ void QgsGeometryPaintEngine::addSubpathGeometries( const QPainterPath &path, con if ( queuedPolygons.empty() ) return; - mGeometry.reserve( mGeometry.numGeometries() + queuedPolygons.size() ); + mGeometry.reserve( static_cast< int >( mGeometry.numGeometries() + queuedPolygons.size() ) ); QgsMultiPolygon tempMultiPolygon; - tempMultiPolygon.reserve( queuedPolygons.size() ); + tempMultiPolygon.reserve( static_cast< int >( queuedPolygons.size() ) ); for ( auto &part : queuedPolygons ) { tempMultiPolygon.addGeometry( part.release() ); diff --git a/src/core/painting/qgsgeometrypaintdevice.h b/src/core/painting/qgsgeometrypaintdevice.h index 8da977b11fac..9c1e6bcb7c57 100644 --- a/src/core/painting/qgsgeometrypaintdevice.h +++ b/src/core/painting/qgsgeometrypaintdevice.h @@ -92,7 +92,7 @@ class QgsGeometryPaintEngine: public QPaintEngine bool mUsePathStroker = false; QPen mPen; QgsGeometryCollection mGeometry; - int mStrokedPathsSegments = 8; + static constexpr int mStrokedPathsSegments = 8; }; #endif