Skip to content
Permalink
Browse files

qgstracer.cpp: fix warning about potentially uninitialized variable (…

…likely false positive, but not so obvious)
  • Loading branch information
rouault authored and nyalldawson committed Jun 15, 2020
1 parent 0d9e063 commit e4dafb590af221bc85f5fdebbf49e39676eec38f
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/qgstracer.cpp
@@ -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;
}
}

0 comments on commit e4dafb5

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