Skip to content

Commit

Permalink
Loop optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Dec 12, 2012
1 parent fe7d4fb commit 9ae2f59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/raster/qgspalettedrasterrenderer.cpp
Expand Up @@ -173,7 +173,8 @@ QgsRasterBlock * QgsPalettedRasterRenderer::block( int bandNo, QgsRectangle con

unsigned int* outputData = ( unsigned int* )( outputBlock->data() );

for ( size_t i = 0; i < ( size_t )width*height; i++ )
size_t rasterSize = ( size_t )width * height;
for ( size_t i = 0; i < rasterSize; ++i )
{
int val = ( int ) inputBlock->value( i );
if ( inputBlock->isNoDataValue( val ) )
Expand Down

0 comments on commit 9ae2f59

Please sign in to comment.