Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored Dec 4, 2024
1 parent 2cf27b7 commit 5e608c9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/analysis/processing/qgsalgorithmmergevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ QVariantMap QgsMergeVectorAlgorithm::processAlgorithm( const QVariantMap &parame
{
const QList< QgsMapLayer * > layers = parameterAsLayerList( parameters, QStringLiteral( "LAYERS" ), context );

bool addSourceFields = parameterAsBool( parameters, QStringLiteral( "ADD_SOURCE_FIELDS" ), context );
const bool addSourceFields = parameterAsBool( parameters, QStringLiteral( "ADD_SOURCE_FIELDS" ), context );

QgsFields outputFields;
long totalFeatureCount = 0;
Expand Down Expand Up @@ -269,8 +269,6 @@ QVariantMap QgsMergeVectorAlgorithm::processAlgorithm( const QVariantMap &parame
QgsAttributes destAttributes;
for ( const QgsField &destField : outputFields )
{
// add source layer information
if ( addSourceFields )
{
if ( addLayerField && destField.name() == QLatin1String( "layer" ) )
{
Expand All @@ -282,7 +280,6 @@ QVariantMap QgsMergeVectorAlgorithm::processAlgorithm( const QVariantMap &parame
destAttributes.append( layerSource );
continue;
}
}

QVariant destAttribute;
const int sourceIndex = layerFields.lookupField( destField.name() );
Expand Down

0 comments on commit 5e608c9

Please sign in to comment.