Skip to content

Commit b94b44a

Browse files
committed
use qIsNaN instead of isnan (fixes windows build)
1 parent 65ac4fe commit b94b44a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/symbology-ng/qgsvectorcolorrampv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
static QColor _interpolate( QColor c1, QColor c2, double value )
3232
{
33-
if ( isnan( value ) ) value = 1;
33+
if ( qIsNaN(value) ) value = 1;
3434
int r = ( int )( c1.red() + value * ( c2.red() - c1.red() ) );
3535
int g = ( int )( c1.green() + value * ( c2.green() - c1.green() ) );
3636
int b = ( int )( c1.blue() + value * ( c2.blue() - c1.blue() ) );
@@ -370,7 +370,7 @@ QColor QgsRandomColorsV2::color( double value ) const
370370
int maxVal = 255;
371371

372372
//if value is nan, then use last precalculated color
373-
int colorIndex = ( !isnan( value ) ? value : 1 ) * ( mTotalColorCount - 1 );
373+
int colorIndex = ( !qIsNaN( value ) ? value : 1 ) * ( mTotalColorCount - 1 );
374374
if ( mTotalColorCount >= 1 && mPrecalculatedColors.length() > colorIndex )
375375
{
376376
//use precalculated hue

0 commit comments

Comments
 (0)