Skip to content
Permalink
Browse files
Fix cppcheck warning
  • Loading branch information
nyalldawson committed Jun 18, 2021
1 parent bfed43f commit 2b37235d0ca583b40caff22c6859726232945463
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/expression/qgsexpressionfunction.cpp
@@ -676,7 +676,7 @@ static QVariant fcnAggregate( const QVariantList &values, const QgsExpressionCon
cacheKey = QStringLiteral( "aggfcn:%1:%2:%3:%4:%5" ).arg( vl->id(), QString::number( aggregate ), subExpression, parameters.filter, orderBy );
}

if ( context && context->hasCachedValue( cacheKey ) )
if ( context->hasCachedValue( cacheKey ) )
{
return context->cachedValue( cacheKey );
}
@@ -685,13 +685,13 @@ static QVariant fcnAggregate( const QVariantList &values, const QgsExpressionCon
QgsExpressionContextScope *subScope = new QgsExpressionContextScope();
subScope->setVariable( QStringLiteral( "parent" ), context->feature() );
subContext.appendScope( subScope );
result = vl->aggregate( aggregate, subExpression, parameters, &subContext, &ok, nullptr, context ? context->feedback() : nullptr );
result = vl->aggregate( aggregate, subExpression, parameters, &subContext, &ok, nullptr, context->feedback() );

context->setCachedValue( cacheKey, result );
}
else
{
result = vl->aggregate( aggregate, subExpression, parameters, nullptr, &ok, nullptr, context ? context->feedback() : nullptr );
result = vl->aggregate( aggregate, subExpression, parameters, nullptr, &ok );
}
if ( !ok )
{

0 comments on commit 2b37235

Please sign in to comment.