Skip to content
Permalink
Browse files

Sanitize usage of static regex

  • Loading branch information
m-kuhn committed Dec 23, 2020
1 parent 9e0bf6d commit fc8430f81702c57fc45d9ce8669b1d72822be406
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgsprojutils.cpp
@@ -257,9 +257,10 @@ bool QgsProjUtils::coordinateOperationIsAvailable( const QString &projDef )
QList<QgsDatumTransform::GridDetails> QgsProjUtils::gridsUsed( const QString &proj )
{
static QRegularExpression sRegex( QStringLiteral( "\\+(?:nad)?grids=(.*?)\\s" ) );
QRegularExpression regex( sRegex );

QList< QgsDatumTransform::GridDetails > grids;
QRegularExpressionMatchIterator matches = sRegex.globalMatch( proj );
QRegularExpressionMatchIterator matches = regex.globalMatch( proj );
while ( matches.hasNext() )
{
const QRegularExpressionMatch match = matches.next();

0 comments on commit fc8430f

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