Use our macros.
This commit is contained in:
@@ -26,8 +26,7 @@ NoteType NoteDataUtil::GetSmallestNoteTypeForMeasure( const NoteData &nd, int iM
|
|||||||
NoteType NoteDataUtil::GetSmallestNoteTypeInRange( const NoteData &n, int iStartIndex, int iEndIndex )
|
NoteType NoteDataUtil::GetSmallestNoteTypeInRange( const NoteData &n, int iStartIndex, int iEndIndex )
|
||||||
{
|
{
|
||||||
// probe to find the smallest note type
|
// probe to find the smallest note type
|
||||||
NoteType nt;
|
FOREACH_ENUM(NoteType, nt)
|
||||||
for( nt=(NoteType)0; nt<NUM_NoteType; nt=NoteType(nt+1) ) // for each NoteType, largest to largest
|
|
||||||
{
|
{
|
||||||
float fBeatSpacing = NoteTypeToBeat( nt );
|
float fBeatSpacing = NoteTypeToBeat( nt );
|
||||||
int iRowSpacing = lrintf( fBeatSpacing * ROWS_PER_BEAT );
|
int iRowSpacing = lrintf( fBeatSpacing * ROWS_PER_BEAT );
|
||||||
@@ -49,13 +48,9 @@ NoteType NoteDataUtil::GetSmallestNoteTypeInRange( const NoteData &n, int iStart
|
|||||||
if( bFoundSmallerNote )
|
if( bFoundSmallerNote )
|
||||||
continue; // searching the next NoteType
|
continue; // searching the next NoteType
|
||||||
else
|
else
|
||||||
break; // stop searching. We found the smallest NoteType
|
return nt; // stop searching. We found the smallest NoteType
|
||||||
}
|
}
|
||||||
|
|
||||||
if( nt == NUM_NoteType ) // we didn't find one
|
|
||||||
return NoteType_Invalid; // well-formed notes created in the editor should never get here
|
return NoteType_Invalid; // well-formed notes created in the editor should never get here
|
||||||
else
|
|
||||||
return nt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sSMNoteData, int start,
|
static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sSMNoteData, int start,
|
||||||
|
|||||||
Reference in New Issue
Block a user