mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Fix maybe uninitialized warning in release builds (#62741)
This commit is contained in:
parent
f8a09b58ea
commit
35d4c01172
@ -85,7 +85,7 @@ QVariantMap QgsConvertGeometryTypeAlgorithm::processAlgorithm( const QVariantMap
|
||||
}
|
||||
|
||||
const int typeIndex = parameterAsEnum( parameters, QStringLiteral( "TYPE" ), context );
|
||||
Qgis::WkbType outputWkbType;
|
||||
Qgis::WkbType outputWkbType = Qgis::WkbType::Unknown;
|
||||
|
||||
if ( typeIndex == 0 ) // centroids
|
||||
{
|
||||
@ -107,6 +107,10 @@ QVariantMap QgsConvertGeometryTypeAlgorithm::processAlgorithm( const QVariantMap
|
||||
{
|
||||
outputWkbType = Qgis::WkbType::Polygon;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw QgsProcessingException( QObject::tr( "Invalid TYPE parameter value: %1" ).arg( typeIndex ) );
|
||||
}
|
||||
|
||||
// preserve Z/M values
|
||||
if ( QgsWkbTypes::hasM( source->wkbType() ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user