Skip to content

Commit

Permalink
don't break the loop after interior ring while calculating perimeter:
Browse files Browse the repository at this point in the history
the returned ptr's pointing to a wrong position whether we break the loop before reading all the points of all the rings.
  • Loading branch information
brushtyler committed Dec 16, 2012
1 parent a2f4db6 commit 923ab1b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -543,16 +543,15 @@ unsigned char* QgsDistanceArea::measurePolygon( unsigned char* feature, double*

if ( perimeter )
{
*perimeter += measureLine( points );
if ( idx == 0 )
{
// exterior ring
*perimeter += measureLine( points );
}
}
}

points.clear();

if ( !area )
{
break;
}
}
}
catch ( QgsCsException &cse )
Expand Down

3 comments on commit 923ab1b

@brushtyler
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! The commit message should look like "don't break the loop after exterior ring [...]".
Any way to change it after it was pushed?

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No way to change it once you push it. Well you can but it's not a good idea as other people would have got that change and you will change the commit id.

@brushtyler
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a good idea as other people would have got that change and you will change the commit id.

... and Jenkins has already ended to process it about 32 min ago :)

Please sign in to comment.