Skip to content

Commit 9ae2f59

Browse files
committedDec 12, 2012
Loop optimisation
1 parent fe7d4fb commit 9ae2f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/core/raster/qgspalettedrasterrenderer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ QgsRasterBlock * QgsPalettedRasterRenderer::block( int bandNo, QgsRectangle con
173173

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

176-
for ( size_t i = 0; i < ( size_t )width*height; i++ )
176+
size_t rasterSize = ( size_t )width * height;
177+
for ( size_t i = 0; i < rasterSize; ++i )
177178
{
178179
int val = ( int ) inputBlock->value( i );
179180
if ( inputBlock->isNoDataValue( val ) )

0 commit comments

Comments
 (0)
Please sign in to comment.