Skip to content

Commit

Permalink
optimize memory reservation in getCellValuesFromBlockStack()
Browse files Browse the repository at this point in the history
  • Loading branch information
root676 authored and nyalldawson committed Jul 2, 2020
1 parent bf7a47a commit cf6e634
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/analysis/processing/qgsrasteranalysisutils.cpp
Expand Up @@ -291,6 +291,8 @@ std::vector<double> QgsRasterAnalysisUtils::getCellValuesFromBlockStack( const s
{
//get all values from inputBlocks
std::vector<double> cellValues;
cellValues.reserve( inputBlocks.size() );

for ( auto &block : inputBlocks )
{
double value = 0;
Expand Down

0 comments on commit cf6e634

Please sign in to comment.