Navigation Menu

Skip to content

Commit

Permalink
explicit const
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Aug 16, 2021
1 parent 0dbf163 commit a346ec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/processing/qgsrasteranalysisutils.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit a346ec1

Please sign in to comment.