Skip to content
Permalink
Browse files

NAN -> quiet_NaN()

  • Loading branch information
alexbruy committed Jan 2, 2020
1 parent b5d71d3 commit 34f8ca3a944c573af9a4500d920340c89a64ce47
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/processing/qgsprocessingparameters.cpp
@@ -1479,21 +1479,21 @@ QList<double> QgsProcessingParameters::parameterAsRange( const QgsProcessingPara
}

if ( resultStringList.size() < 2 )
return QList< double >() << NAN << NAN;
return QList< double >() << std::numeric_limits<double>::quiet_NaN() << std::numeric_limits<double>::quiet_NaN() ;

QList< double > result;
bool ok = false;
double n = resultStringList.at( 0 ).toDouble( &ok );
if ( ok )
result << n;
else
result << NAN;
result << std::numeric_limits<double>::quiet_NaN() ;
ok = false;
n = resultStringList.at( 1 ).toDouble( &ok );
if ( ok )
result << n;
else
result << NAN;
result << std::numeric_limits<double>::quiet_NaN() ;

return result;
}

0 comments on commit 34f8ca3

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