Skip to content

Commit

Permalink
Minor performance tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 23, 2018
1 parent c7eafc6 commit 34bb08c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -4967,7 +4967,7 @@ void QgsWithVariableExpressionFunction::popTemporaryVariable( const QgsExpressio
void QgsWithVariableExpressionFunction::appendTemporaryVariable( const QgsExpressionContext *context, const QString &name, const QVariant &value ) const
{
QgsExpressionContextScope *scope = new QgsExpressionContextScope();
scope->setVariable( name, value );
scope->addVariable( QgsExpressionContextScope::StaticVariable( name, value, true ) );

QgsExpressionContext *updatedContext = const_cast<QgsExpressionContext *>( context );
updatedContext->appendScope( scope );
Expand Down

0 comments on commit 34bb08c

Please sign in to comment.