fix warnings

This commit is contained in:
Glenn Maynard
2004-11-01 11:02:54 +00:00
parent 9cfb7c6d6c
commit 1eac0a3fa9
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -880,7 +880,7 @@ void NoteDataUtil::Wide( NoteData &inout, float fStartBeat, float fEndBeat )
inout.ConvertHoldNotesTo4s();
/* Start on an even beat. */
fStartBeat = Quantize( fStartBeat, 2 );
fStartBeat = Quantize( fStartBeat, 2.0f );
const int first_row = BeatToNoteRow( fStartBeat );
const int last_row = min( BeatToNoteRow(fEndBeat), inout.GetLastRow() );
+1 -1
View File
@@ -333,7 +333,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out, const map<CSt
// some BMS files seem to have funky alignment, causing us to write gigantic cache files.
// Try to correct for this by quantizing.
row = int(Quantize( float(row), ROWS_PER_MEASURE/64 ));
row = Quantize( row, ROWS_PER_MEASURE/64 );
BmsTrack bmsTrack;
bool bIsHold;
+5
View File
@@ -156,6 +156,11 @@ inline float Quantize( const float f, const float fRoundInterval )
return int( (f + fRoundInterval/2)/fRoundInterval ) * fRoundInterval;
}
inline int Quantize( const int i, const int iRoundInterval )
{
return int( (i + iRoundInterval/2)/iRoundInterval ) * iRoundInterval;
}
/* return f truncated to the nearest multiple of fTruncInterval */
inline float ftruncf( const float f, const float fTruncInterval )
{