Skip to content
Permalink
Browse files
explicit const
  • Loading branch information
lbartoletti authored and nyalldawson committed Aug 16, 2021
1 parent 0dbf163 commit a346ec1340f701defdcda599d037c6f5ee028667
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/processing/qgsrasteranalysisutils.cpp
@@ -401,7 +401,7 @@ double QgsRasterAnalysisUtils::majorityFromCellValues( std::vector<double> &cell
int maxCount = 0;
bool multipleMajorities = false;
double result = noDataValue;
for ( const auto &pair : map )
for ( const auto &pair : std::as_const( map ) )
{
if ( maxCount < pair.second )
{
@@ -449,7 +449,7 @@ double QgsRasterAnalysisUtils::minorityFromCellValues( std::vector<double> &cell
int minCount = stackSize;
bool multipleMinorities = false;
double result = noDataValue; //result will stay NoData if no minority value exists
for ( const auto &pair : map )
for ( const auto &pair : std::as_const( map ) )
{
if ( minCount > pair.second )
{

0 comments on commit a346ec1

Please sign in to comment.