Simplify. Remove the condition from the iterator. Almost nothing uses it (although other things could), it seems more trouble than it's worth.

This commit is contained in:
Steve Checkoway
2007-09-17 03:27:33 +00:00
parent 215fd9f2ad
commit 15611d510b
4 changed files with 17 additions and 34 deletions
+5 -3
View File
@@ -62,13 +62,15 @@ int GetNumHoldNotesWithScore( const NoteData &in, TapNote::SubType subType, Hold
return iNumSuccessfulHolds;
}
bool AvoidedMines( const TapNote &tn ) { return tn.type == TapNote::mine && tn.result.tns == TNS_AvoidMine; }
int GetSuccessfulMines( const NoteData &in, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW )
{
int iNumSuccessfulMinesNotes = 0;
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex, AvoidedMines );
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex );
for( ; !iter.IsAtEnd(); ++iter )
iNumSuccessfulMinesNotes++;
{
if( iter->type == TapNote::mine && iter->result.tns == TNS_AvoidMine )
++iNumSuccessfulMinesNotes;
}
return iNumSuccessfulMinesNotes;
}