From 2621d95279aee1088defdf3269584cacc65aabb0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 5 Jun 2024 08:25:30 +1000 Subject: [PATCH] Address review --- src/core/painting/qgsgeometrypaintdevice.cpp | 4 ++-- src/core/painting/qgsgeometrypaintdevice.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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