Skip to content

Commit

Permalink
Apply clazy optimisation to orthogonalize algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 23, 2018
1 parent 59c9b97 commit 486c3a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/geometry/qgsinternalgeometryengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,12 @@ QgsLineString *doOrthogonalize( QgsLineString *ring, int iterations, double tole

std::unique_ptr< QgsLineString > best( ring->clone() );

QVector< QgsVector > /* yep */ motions;
motions.reserve( numPoints );

for ( int it = 0; it < iterations; ++it )
{
QVector< QgsVector > /* yep */ motions;
motions.reserve( numPoints );
motions.resize( 0 ); // avoid re-allocations

// first loop through an calculate all motions
QgsPoint a;
Expand Down

0 comments on commit 486c3a2

Please sign in to comment.