(float) atof() -> strtof(), which computes in float instead of computing in
double and casting to float, which is silly
This commit is contained in:
@@ -94,7 +94,7 @@ float HHMMSSToSeconds( const CString &sHHMMSS )
|
||||
float fSeconds = 0;
|
||||
fSeconds += atoi( arrayBits[0] ) * 60 * 60;
|
||||
fSeconds += atoi( arrayBits[1] ) * 60;
|
||||
fSeconds += (float)atof( arrayBits[2] );
|
||||
fSeconds += strtof( arrayBits[2], NULL );
|
||||
|
||||
return fSeconds;
|
||||
}
|
||||
@@ -1232,7 +1232,7 @@ bool FileRead(RageFile& f, float& fOut)
|
||||
CString s;
|
||||
if (!FileRead(f, s))
|
||||
return false;
|
||||
fOut = (float)atof(s);
|
||||
fOut = strtof( s, NULL );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user