Skip to content
Permalink
Browse files

Remove template class

  • Loading branch information
m-kuhn committed Dec 21, 2018
1 parent ff1f2df commit ceb65a24b9a22b1dfc492c089cc82bb65c8292b9
Showing with 0 additions and 22 deletions.
  1. +0 −22 src/core/expression/qgsexpressionfunction.cpp
@@ -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();

0 comments on commit ceb65a2

Please sign in to comment.
You can’t perform that action at this time.