Skip to content

Commit

Permalink
x_passed -> xFound
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 9, 2021
1 parent a13e213 commit 1d0e482
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/geometry/qgsgeometryutils.cpp
Expand Up @@ -1808,28 +1808,28 @@ void QgsGeometryUtils::weightedPointInTriangle( const double aX, const double aY

bool QgsGeometryUtils::transferFirstZOrMValueToPoint( const QgsPointSequence &points, QgsPoint &point )
{
bool z_passed = false;
bool m_passed = false;
bool zFound = false;
bool mFound = false;

for ( const QgsPoint &pt : points )
{
if ( !m_passed && pt.isMeasure() )
{
point.convertTo( QgsWkbTypes::addM( point.wkbType() ) );
point.setM( pt.m() );
m_passed = true;
mFound = true;
}
if ( !z_passed && pt.is3D() )
{
point.convertTo( QgsWkbTypes::addZ( point.wkbType() ) );
point.setZ( pt.z() );
z_passed = true;
zFound = true;
}
if ( z_passed && m_passed )
if ( zFound && mFound )
break;
}

return z_passed || m_passed;
return zFound || mFound;
}

bool QgsGeometryUtils::transferFirstMValueToPoint( const QgsPointSequence &points, QgsPoint &point )
Expand Down

0 comments on commit 1d0e482

Please sign in to comment.