Minimal performance improvement

This commit is contained in:
Matthias Kuhn 2017-06-26 08:28:16 +02:00
parent a3f14df367
commit fd8158bca0

View File

@ -34,7 +34,7 @@ bool QgsCurve::isClosed() const
bool closed = qgsDoubleNear( start.x(), end.x(), 1E-8 ) &&
qgsDoubleNear( start.y(), end.y(), 1E-8 );
if ( is3D() )
if ( is3D() && closed )
closed &= qgsDoubleNear( start.z(), end.z(), 1E-8 ) || ( qIsNaN( start.z() ) && qIsNaN( end.z() ) );
return closed;
}