add fast ClearAll().

This commit is contained in:
Glenn Maynard
2002-12-14 20:30:49 +00:00
parent 2b16fbc4a3
commit 689e9b150d
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -51,6 +51,13 @@ void NoteData::ClearRange( int iNoteIndexBegin, int iNoteIndexEnd )
this->Convert4sToHoldNotes();
}
void NoteData::ClearAll()
{
for( int t=0; t<m_iNumTracks; t++ )
m_TapNotes[t].clear();
m_HoldNotes.clear();
}
/* Copy a range from pFrom to this. (Note that this does *not* overlay;
* all data in the range is overwritten.) */
void NoteData::CopyRange( NoteData* pFrom, int iFromIndexBegin, int iFromIndexEnd, int iToIndexBegin )
+1 -1
View File
@@ -63,7 +63,7 @@ public:
void SetTapNote(int track, int row, TapNote t);
void ClearRange( int iNoteIndexBegin, int iNoteIndexEnd );
void ClearAll() { ClearRange( 0, MAX_TAP_NOTE_ROWS ); };
void ClearAll();
void CopyRange( NoteData* pFrom, int iFromIndexBegin, int iFromIndexEnd, int iToIndexBegin = -1 );
void CopyAll( NoteData* pFrom );