isfinite -> finite
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "RageFileManager.h"
|
||||
#include "CourseWriterCRS.h"
|
||||
#include "RageUtil.h"
|
||||
#include <float.h>
|
||||
|
||||
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") )
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Style.h"
|
||||
#include "CommonMetrics.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
#include <float.h>
|
||||
|
||||
#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 )
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Foreach.h"
|
||||
#include "LocalizedString.h"
|
||||
#include "LuaFunctions.h"
|
||||
#include <float.h>
|
||||
|
||||
#include <numeric>
|
||||
#include <ctime>
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user