Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More thread local
  • Loading branch information
m-kuhn authored and github-actions[bot] committed May 11, 2021
1 parent c7a5bfe commit 64c8413
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/expression/qgsexpressionnodeimpl.cpp
Expand Up @@ -538,20 +538,20 @@ QVariant QgsExpressionNodeBinaryOperator::evalNode( QgsExpression *parent, const
{
esc_regexp.replace( 0, 1, QStringLiteral( ".*" ) );
}
QRegExp rx1( QStringLiteral( "[^\\\\](%)" ) );
const thread_local QRegExp rx1( QStringLiteral( "[^\\\\](%)" ) );
int pos = 0;
while ( ( pos = rx1.indexIn( esc_regexp, pos ) ) != -1 )
{
esc_regexp.replace( pos + 1, 1, QStringLiteral( ".*" ) );
pos += 1;
}
QRegExp rx2( QStringLiteral( "\\\\%" ) );
const thread_local QRegExp rx2( QStringLiteral( "\\\\%" ) );
esc_regexp.replace( rx2, QStringLiteral( "%" ) );
if ( esc_regexp.startsWith( '_' ) )
{
esc_regexp.replace( 0, 1, QStringLiteral( "." ) );
}
QRegExp rx3( QStringLiteral( "[^\\\\](_)" ) );
const thread_local QRegExp rx3( QStringLiteral( "[^\\\\](_)" ) );
pos = 0;
while ( ( pos = rx3.indexIn( esc_regexp, pos ) ) != -1 )
{
Expand Down

0 comments on commit 64c8413

Please sign in to comment.