diff --git a/stepmania/src/CourseLoaderCRS.cpp b/stepmania/src/CourseLoaderCRS.cpp index f76be33df1..653543a559 100644 --- a/stepmania/src/CourseLoaderCRS.cpp +++ b/stepmania/src/CourseLoaderCRS.cpp @@ -13,6 +13,7 @@ #include "RageFileManager.h" #include "CourseWriterCRS.h" #include "RageUtil.h" +#include const int MAX_EDIT_COURSE_SIZE_BYTES = 30*1024; // 30KB @@ -63,7 +64,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou { fGainSeconds = StringToFloat( sParams[1] ); - if( !isfinite(fGainSeconds) ) + if( !finite(fGainSeconds) ) fGainSeconds = 0.0f; } else if( 0 == stricmp(sValueName, "METER") ) diff --git a/stepmania/src/PlayerOptions.cpp b/stepmania/src/PlayerOptions.cpp index 663eab4391..7e96d1404a 100644 --- a/stepmania/src/PlayerOptions.cpp +++ b/stepmania/src/PlayerOptions.cpp @@ -12,6 +12,7 @@ #include "Style.h" #include "CommonMetrics.h" #include "arch/Dialog/Dialog.h" +#include #define ONE( arr ) { for( unsigned Z = 0; Z < ARRAYSIZE(arr); ++Z ) arr[Z]=1.0f; } @@ -257,7 +258,7 @@ void PlayerOptions::FromString( const RString &sOptions, bool bWarnOnInvalid ) else if( *s[0]=='*' ) { sscanf( *s, "*%f", &speed ); - if( !isfinite(speed) ) + if( !finite(speed) ) speed = 1.0f; } } @@ -279,7 +280,7 @@ void PlayerOptions::FromString( const RString &sOptions, bool bWarnOnInvalid ) } else if( sscanf( sBit, "c%f", &level ) == 1 ) { - if( !isfinite(level) || level <= 0.0f ) + if( !finite(level) || level <= 0.0f ) level = 200.0f; // Just pick some value. SET_FLOAT( fScrollBPM ) SET_FLOAT( fTimeSpacing ) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index de484a0bed..7c92d845d2 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -6,6 +6,7 @@ #include "Foreach.h" #include "LocalizedString.h" #include "LuaFunctions.h" +#include #include #include @@ -1476,7 +1477,7 @@ float StringToFloat( const RString &sString ) { float ret = strtof( sString, NULL ); - if( !isfinite(ret) ) + if( !finite(ret) ) ret = 0.0f; return ret; } @@ -1905,7 +1906,7 @@ bool FromString( const RString &sValue, float &out ) { const char *endptr = sValue.data() + sValue.size(); out = strtof( sValue, (char **) &endptr ); - return endptr != sValue.data() && isfinite( out ); + return endptr != sValue.data() && finite( out ); } bool FromString( const RString &sValue, bool &out )