Navigation Menu

Skip to content

Commit

Permalink
replace convertTo/set by add{M,Z}Value
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 9, 2021
1 parent 1d0e482 commit dabd15e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/core/geometry/qgsgeometryutils.cpp
Expand Up @@ -1815,14 +1815,12 @@ bool QgsGeometryUtils::transferFirstZOrMValueToPoint( const QgsPointSequence &po
{
if ( !m_passed && pt.isMeasure() )
{
point.convertTo( QgsWkbTypes::addM( point.wkbType() ) );
point.setM( pt.m() );
point.addMValue( pt.m() );
mFound = true;
}
if ( !z_passed && pt.is3D() )
{
point.convertTo( QgsWkbTypes::addZ( point.wkbType() ) );
point.setZ( pt.z() );
point.addZValue( pt.z() );
zFound = true;
}
if ( zFound && mFound )
Expand All @@ -1840,8 +1838,7 @@ bool QgsGeometryUtils::transferFirstMValueToPoint( const QgsPointSequence &point
{
if ( pt.isMeasure() )
{
point.convertTo( QgsWkbTypes::addM( point.wkbType() ) );
point.setM( pt.m() );
point.addMValue( pt.m() );
rc = true;
break;
}
Expand All @@ -1858,8 +1855,7 @@ bool QgsGeometryUtils::transferFirstZValueToPoint( const QgsPointSequence &point
{
if ( pt.is3D() )
{
point.convertTo( QgsWkbTypes::addZ( point.wkbType() ) );
point.setZ( pt.z() );
point.addZValue( pt.z() );
rc = true;
break;
}
Expand Down

0 comments on commit dabd15e

Please sign in to comment.