Skip to content
Permalink
Browse files

move constructor outside the loop

  • Loading branch information
lbartoletti committed Aug 25, 2020
1 parent edd0f44 commit 2c33e6e67050432d79dd561628c6b7bfc1909526
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgsgeometryutils.cpp
@@ -1107,12 +1107,12 @@ QgsPointSequence QgsGeometryUtils::pointsFromWKT( const QString &wktCoordinateLi
bool foundZ = false;
bool foundM = false;
QRegularExpression rx( QStringLiteral( "\\s" ) );
QRegularExpression rxIsNumber( QStringLiteral( "^[+-]?(\\d\\.?\\d*[Ee][+\\-]?\\d+|(\\d+\\.\\d*|\\d*\\.\\d+)|\\d+)$" ) );
for ( const QString &pointCoordinates : coordList )
{
QStringList coordinates = pointCoordinates.split( rx, QString::SkipEmptyParts );

// exit with an empty set if one list contains invalid value.
QRegularExpression rxIsNumber( QStringLiteral( "^[+-]?(\\d\\.?\\d*[Ee][+\\-]?\\d+|(\\d+\\.\\d*|\\d*\\.\\d+)|\\d+)$" ) );
if ( coordinates.filter( rxIsNumber ).size() != coordinates.size() )
return points;

0 comments on commit 2c33e6e

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