Skip to content

Commit

Permalink
Fix clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 13, 2022
1 parent 66aa8eb commit 20b7a69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/analysis/processing/qgsoverlayutils.cpp
Expand Up @@ -106,7 +106,7 @@ void QgsOverlayUtils::difference( const QgsFeatureSource &sourceA, const QgsFeat
if ( outputAttrs != OutputBA )
requestB.setDestinationCrs( sourceA.sourceCrs(), context.transformContext() );

double step = sourceB.featureCount() > 0 ? 100.0 / sourceB.featureCount() : 1;
double step = sourceB.featureCount() > 0 ? 100.0 / static_cast< double >( sourceB.featureCount() ) : 1;
long long i = 0;
QgsFeatureIterator fi = sourceB.getFeatures( requestB );

Expand All @@ -117,7 +117,7 @@ void QgsOverlayUtils::difference( const QgsFeatureSource &sourceA, const QgsFeat
if ( feedback->isCanceled() )
return false;

feedback->setProgress( i * step );
feedback->setProgress( static_cast< double >( i * step ) );

return true;
} );
Expand Down Expand Up @@ -241,7 +241,7 @@ void QgsOverlayUtils::intersection( const QgsFeatureSource &sourceA, const QgsFe

QgsFeature outFeat;

double step = sourceB.featureCount() > 0 ? 100.0 / sourceB.featureCount() : 1;
double step = sourceB.featureCount() > 0 ? 100.0 / static_cast< double >( sourceB.featureCount() ) : 1;
long long i = 0;
QgsFeatureIterator fi = sourceB.getFeatures( request );
feedback->setProgressText( QObject::tr( "Creating spatial index" ) );
Expand All @@ -251,7 +251,7 @@ void QgsOverlayUtils::intersection( const QgsFeatureSource &sourceA, const QgsFe
if ( feedback->isCanceled() )
return false;

feedback->setProgress( i * step );
feedback->setProgress( static_cast< double >( i * step ) );

return true;
} );
Expand Down

0 comments on commit 20b7a69

Please sign in to comment.