Skip to content

Commit

Permalink
qgstracer.cpp: fix warning about potentially uninitialized variable (…
Browse files Browse the repository at this point in the history
…likely false positive, but not so obvious)
  • Loading branch information
rouault authored and nyalldawson committed Jun 15, 2020
1 parent 0d9e063 commit e4dafb5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/qgstracer.cpp
Expand Up @@ -278,18 +278,17 @@ int point2vertex( const QgsTracerGraph &g, const QgsPointXY &pt, double epsilon

int point2edge( const QgsTracerGraph &g, const QgsPointXY &pt, int &lineVertexAfter, double epsilon = 1e-6 )
{
int vertexAfter;

for ( int i = 0; i < g.e.count(); ++i )
{
if ( g.inactiveEdges.contains( i ) )
continue; // ignore temporarily disabled edges

const QgsTracerGraph::E &e = g.e.at( i );
int vertexAfter = -1;
double dist = closestSegment( e.coords, pt, vertexAfter, epsilon );
if ( dist == 0 )
{
lineVertexAfter = vertexAfter; //NOLINT
lineVertexAfter = vertexAfter;
return i;
}
}
Expand Down

0 comments on commit e4dafb5

Please sign in to comment.