From 8340759571cea2d89b11bea2588e30ab1fde88de Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 3 Jan 2005 20:54:28 +0000 Subject: [PATCH] optimization --- stepmania/src/NoteDataUtil.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 52bbaf9b90..baffa30de4 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -171,7 +171,11 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData } } - out.SetTapNote( iTrack, iIndex, tn ); + /* Optimization: if we pass TAP_EMPTY, NoteData will do a search + * to remove anything in this position. We know that there's nothing + * there, so avoid the search. */ + if( tn.type != TapNote::empty ) + out.SetTapNote( iTrack, iIndex, tn ); iTrack++; }