(float) atof() -> strtof(), which computes in float instead of computing in

double and casting to float, which is silly
This commit is contained in:
Glenn Maynard
2004-08-10 20:57:59 +00:00
parent 9db234c181
commit aad73b53e9
16 changed files with 47 additions and 47 deletions
+3 -3
View File
@@ -533,7 +533,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
}
else if( value_name == "#bpm" )
{
BPMSegment newSeg( 0, (float)atof(value_data) );
BPMSegment newSeg( 0, strtof(value_data, NULL) );
out.AddBPMSegment( newSeg );
LOG->Trace( "Inserting new BPM change at beat %f, BPM %f", newSeg.m_fStartBeat, newSeg.m_fBPM );
@@ -640,7 +640,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
if( 0==stricmp(value_name, sTagToLookFor) )
{
fBPM = (float)atof( value_data );
fBPM = strtof( value_data, NULL );
break;
}
}
@@ -716,7 +716,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
if( fBPM == -1 )
fBPM = out.m_Timing.m_BPMSegments[out.m_Timing.m_BPMSegments.size()-1].m_fBPM;
fFreezeSecs = (float)atof(value_data)/(fBPM*0.81f); // I have no idea what units these are in, so I experimented until finding this factor.
fFreezeSecs = strtof(value_data,NULL)/(fBPM*0.81f); // I have no idea what units these are in, so I experimented until finding this factor.
break;
}
}