(float) atof() -> strtof(), which computes in float instead of computing in
double and casting to float, which is silly
This commit is contained in:
@@ -274,17 +274,17 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
if( 0==stricmp(sValueName,"TITLE") )
|
||||
LoadTags(sParams[1], out);
|
||||
else if( 0==stricmp(sValueName,"BPM") )
|
||||
out.AddBPMSegment( BPMSegment(0, (float)atof(sParams[1])) );
|
||||
out.AddBPMSegment( BPMSegment(0, strtof(sParams[1], NULL)) );
|
||||
else if( 0==stricmp(sValueName,"BPM2") )
|
||||
BPM2 = float(atof(sParams[1]));
|
||||
BPM2 = strtof( sParams[1], NULL );
|
||||
else if( 0==stricmp(sValueName,"BPM3") )
|
||||
BPM3 = float(atof(sParams[1]));
|
||||
BPM3 = strtof( sParams[1], NULL );
|
||||
else if( 0==stricmp(sValueName,"BUNKI") )
|
||||
BPMPos2 = float(atof(sParams[1])) / 100.0f;
|
||||
BPMPos2 = strtof( sParams[1], NULL ) / 100.0f;
|
||||
else if( 0==stricmp(sValueName,"BUNKI2") )
|
||||
BPMPos3 = float(atof(sParams[1])) / 100.0f;
|
||||
BPMPos3 = strtof( sParams[1], NULL ) / 100.0f;
|
||||
else if( 0==stricmp(sValueName,"STARTTIME") )
|
||||
out.m_Timing.m_fBeat0OffsetInSeconds = -(float)atof(sParams[1])/100;
|
||||
out.m_Timing.m_fBeat0OffsetInSeconds = -strtof( sParams[1], NULL )/100;
|
||||
else if( 0==stricmp(sValueName,"TICKCOUNT") ||
|
||||
0==stricmp(sValueName,"STEP") ||
|
||||
0==stricmp(sValueName,"DIFFICULTY"))
|
||||
|
||||
Reference in New Issue
Block a user