@@ -415,7 +415,7 @@ static QVariant fcnExpScale( const QVariantList &values, const QgsExpressionCont
415
415
416
416
static QVariant fcnMax ( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
417
417
{
418
- QVariant result;
418
+ QVariant result ( QVariant::Double ) ;
419
419
double maxVal = std::numeric_limits<double >::quiet_NaN ();
420
420
for ( const QVariant &val : values )
421
421
{
@@ -439,7 +439,7 @@ static QVariant fcnMax( const QVariantList &values, const QgsExpressionContext *
439
439
440
440
static QVariant fcnMin ( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
441
441
{
442
- QVariant result;
442
+ QVariant result ( QVariant::Double ) ;
443
443
double minVal = std::numeric_limits<double >::quiet_NaN ();
444
444
for ( const QVariant &val : values )
445
445
{
@@ -3941,8 +3941,8 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()
3941
3941
sFunctions << randfFunc;
3942
3942
3943
3943
sFunctions
3944
- << new QgsStaticExpressionFunction ( QStringLiteral ( " max" ), -1 , fcnMax, QStringLiteral ( " Math" ) )
3945
- << new QgsStaticExpressionFunction ( QStringLiteral ( " min" ), -1 , fcnMin, QStringLiteral ( " Math" ) )
3944
+ << new QgsStaticExpressionFunction ( QStringLiteral ( " max" ), -1 , fcnMax, QStringLiteral ( " Math" ), QString (), false , QSet<QString>(), false , QStringList (), /* handlesNull = */ true )
3945
+ << new QgsStaticExpressionFunction ( QStringLiteral ( " min" ), -1 , fcnMin, QStringLiteral ( " Math" ), QString (), false , QSet<QString>(), false , QStringList (), /* handlesNull = */ true )
3946
3946
<< new QgsStaticExpressionFunction ( QStringLiteral ( " clamp" ), QgsExpressionFunction::ParameterList () << QgsExpressionFunction::Parameter ( QStringLiteral ( " min" ) ) << QgsExpressionFunction::Parameter ( QStringLiteral ( " value" ) ) << QgsExpressionFunction::Parameter ( QStringLiteral ( " max" ) ), fcnClamp, QStringLiteral ( " Math" ) )
3947
3947
<< new QgsStaticExpressionFunction ( QStringLiteral ( " scale_linear" ), 5 , fcnLinearScale, QStringLiteral ( " Math" ) )
3948
3948
<< new QgsStaticExpressionFunction ( QStringLiteral ( " scale_exp" ), 6 , fcnExpScale, QStringLiteral ( " Math" ) )
0 commit comments