Skip to content
Permalink
Browse files

format algorithm

  • Loading branch information
root676 authored and nyalldawson committed Jul 28, 2020
1 parent 3bcf457 commit ced15e6d163e51931f0af2a8d1600387fbb839cd
@@ -298,7 +298,7 @@ QgsRasterFrequencyByGreaterThanOperatorAlgorithm *QgsRasterFrequencyByGreaterTha

int QgsRasterFrequencyByGreaterThanOperatorAlgorithm::applyComparisonOperator( double searchValue, std::vector<double> cellValueStack )
{
return static_cast<int>( std::count_if(cellValueStack.begin(), cellValueStack.end(),[&](double const& stackValue){ return stackValue > searchValue; }) );
return static_cast<int>( std::count_if( cellValueStack.begin(), cellValueStack.end(), [&]( double const & stackValue ) { return stackValue > searchValue; } ) );
}

//
@@ -341,7 +341,7 @@ QgsRasterFrequencyByLessThanOperatorAlgorithm *QgsRasterFrequencyByLessThanOpera

int QgsRasterFrequencyByLessThanOperatorAlgorithm::applyComparisonOperator( double searchValue, std::vector<double> cellValueStack )
{
return static_cast<int>( std::count_if(cellValueStack.begin(), cellValueStack.end(),[&](double const& stackValue){ return stackValue < searchValue; }) );
return static_cast<int>( std::count_if( cellValueStack.begin(), cellValueStack.end(), [&]( double const & stackValue ) { return stackValue < searchValue; } ) );
}

///@endcond
@@ -39,7 +39,7 @@ class QgsRasterFrequencyByComparisonOperatorBase : public QgsProcessingAlgorithm
protected:
bool prepareAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
virtual int applyComparisonOperator( double value, std::vector<double>cellValueStack ) = 0;
virtual int applyComparisonOperator( double value, std::vector<double>cellValueStack ) = 0;

private:
std::unique_ptr< QgsRasterInterface > mInputValueRasterInterface;

0 comments on commit ced15e6

Please sign in to comment.
You can’t perform that action at this time.