Skip to content

Commit

Permalink
Remove template class
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 21, 2018
1 parent ff1f2df commit ceb65a2
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -1361,28 +1361,6 @@ static QVariant fcnNumSelected( const QVariantList &values, const QgsExpressionC
return layer->selectedFeatureCount();
}

template <class T>
T getParameterValue( const QString &name, const QVariantList &values, const QgsExpressionNodeFunction *nodeFunction )
{
T result;
QgsExpressionFunction *fd = QgsExpression::Functions().value( nodeFunction->fnIndex() );
if ( fd )
{
const auto &params = fd->parameters();
int idx = 0;
for ( const auto &param : params )
{
if ( param.name() == name )
{
return values.at( idx ).value<T>();
}
++idx;
}
}

return QVariant().value<T>();
};

static QVariant fcnSqliteFetchAndIncrement( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
{
const QString database = values.at( 0 ).toString();
Expand Down

0 comments on commit ceb65a2

Please sign in to comment.