From ca652a6486a42e9b8b4edb5a0c0713b5d33172e0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 11 Oct 2002 20:47:28 +0000 Subject: [PATCH] don't copy the same data hundreds of times for no particular reason --- stepmania/src/NotesLoaderBMS.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/stepmania/src/NotesLoaderBMS.cpp b/stepmania/src/NotesLoaderBMS.cpp index e29ee36c59..5179883d24 100644 --- a/stepmania/src/NotesLoaderBMS.cpp +++ b/stepmania/src/NotesLoaderBMS.cpp @@ -187,19 +187,16 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out ) out.m_NotesType == NOTES_TYPE_DANCE_DOUBLE || out.m_NotesType == NOTES_TYPE_DANCE_COUPLE) // if there are 4 panels, then the Up+Right track really contains the notes for Up { - for( int i=0; im_TapNotes[DANCE_NOTE_PAD1_UP], - pNoteData->m_TapNotes[DANCE_NOTE_PAD1_UPRIGHT], - MAX_TAP_NOTE_ROWS*sizeof(pNoteData->m_TapNotes[0][0]) - ); - memcpy( - pNoteData->m_TapNotes[DANCE_NOTE_PAD2_UP], - pNoteData->m_TapNotes[DANCE_NOTE_PAD2_UPRIGHT], - MAX_TAP_NOTE_ROWS*sizeof(pNoteData->m_TapNotes[0][0]) - ); - } + memcpy( + pNoteData->m_TapNotes[DANCE_NOTE_PAD1_UP], + pNoteData->m_TapNotes[DANCE_NOTE_PAD1_UPRIGHT], + MAX_TAP_NOTE_ROWS*sizeof(pNoteData->m_TapNotes[0][0]) + ); + memset( + pNoteData->m_TapNotes[DANCE_NOTE_PAD2_UPRIGHT], + '0', + MAX_TAP_NOTE_ROWS*sizeof(pNoteData->m_TapNotes[0][0]) + ); } // we're done reading in all of the BMS values @@ -562,7 +559,6 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out ) out.m_BPMSegments[i].m_fStartBeat, out.m_BPMSegments[i].m_fBPM, i ); file.Close(); - - return TRUE; + return true; }