Skip to content
Permalink
Browse files
Regex as cons thread_local
  • Loading branch information
domi4484 committed Jul 12, 2021
1 parent b2c28b0 commit bd22811db7a9585880148a9857e4d76c0d3d13e8
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/core/providers/memory/qgsmemoryprovider.cpp
@@ -119,13 +119,13 @@ QgsMemoryProvider::QgsMemoryProvider( const QString &uri, const ProviderOptions
if ( query.hasQueryItem( QStringLiteral( "field" ) ) )
{
QList<QgsField> attributes;
QRegularExpression reFieldDef( "\\:"
"([\\w\\s]+)" // type
"(?:\\((\\-?\\d+)" // length
"(?:\\,(\\-?\\d+))?" // precision
"\\))?(\\[\\])?" // array
"$",
QRegularExpression::CaseInsensitiveOption );
const thread_local QRegularExpression reFieldDef( "\\:"
"([\\w\\s]+)" // type
"(?:\\((\\-?\\d+)" // length
"(?:\\,(\\-?\\d+))?" // precision
"\\))?(\\[\\])?" // array
"$",
QRegularExpression::CaseInsensitiveOption );
QStringList fields = query.allQueryItemValues( QStringLiteral( "field" ) );
for ( int i = 0; i < fields.size(); i++ )
{

0 comments on commit bd22811

Please sign in to comment.