Skip to content
Permalink
Browse files

Apply clazy optimisation to orthogonalize algorithm

  • Loading branch information
nyalldawson committed Apr 23, 2018
1 parent 59c9b97 commit 486c3a2d6f3a68c381f697e6feaf7b385157db5b
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/geometry/qgsinternalgeometryengine.cpp
@@ -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;

0 comments on commit 486c3a2

Please sign in to comment.
You can’t perform that action at this time.