Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply suggestions (variable name and missing blank space)
  • Loading branch information
gacarrillor authored and nyalldawson committed Mar 15, 2020
1 parent f6ee3e8 commit 1c5fa2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/analysis/processing/qgsalgorithmremovenullgeometry.cpp
Expand Up @@ -62,7 +62,7 @@ QString QgsRemoveNullGeometryAlgorithm::shortHelpString() const
return QObject::tr( "This algorithm removes any features which do not have a geometry from a vector layer. "
"All other features will be copied unchanged.\n\n"
"Optionally, the features with null geometries can be saved to a separate output.\n\n"
"If 'Also remove empty geometries' is checked, the algorithm removes features whose geometries"
"If 'Also remove empty geometries' is checked, the algorithm removes features whose geometries "
"have no coordinates, i.e., geometries that are empty. In that case, also the null "
"output will reflect this option, containing both null and empty geometries." );
}
Expand All @@ -78,7 +78,7 @@ QVariantMap QgsRemoveNullGeometryAlgorithm::processAlgorithm( const QVariantMap
if ( !source )
throw QgsProcessingException( invalidSourceError( parameters, QStringLiteral( "INPUT" ) ) );

const bool remove_empty = parameterAsBoolean( parameters, QStringLiteral( "REMOVE_EMPTY" ), context );
const bool removeEmpty = parameterAsBoolean( parameters, QStringLiteral( "REMOVE_EMPTY" ), context );

QString nonNullSinkId;
std::unique_ptr< QgsFeatureSink > nonNullSink( parameterAsSink( parameters, QStringLiteral( "OUTPUT" ), context, nonNullSinkId, source->fields(),
Expand All @@ -101,11 +101,11 @@ QVariantMap QgsRemoveNullGeometryAlgorithm::processAlgorithm( const QVariantMap
break;
}

if ( ( ( !remove_empty && f.hasGeometry() ) || ( remove_empty && !f.geometry().isEmpty() ) ) && nonNullSink )
if ( ( ( !removeEmpty && f.hasGeometry() ) || ( removeEmpty && !f.geometry().isEmpty() ) ) && nonNullSink )
{
nonNullSink->addFeature( f, QgsFeatureSink::FastInsert );
}
else if ( ( ( !remove_empty && !f.hasGeometry() ) || ( remove_empty && f.geometry().isEmpty() ) ) && nullSink )
else if ( ( ( !removeEmpty && !f.hasGeometry() ) || ( removeEmpty && f.geometry().isEmpty() ) ) && nullSink )
{
nullSink->addFeature( f, QgsFeatureSink::FastInsert );
}
Expand Down

0 comments on commit 1c5fa2d

Please sign in to comment.