From 15e6234625b663585c3d1389cc91c720d59f91ef Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 20 Apr 2003 01:31:13 +0000 Subject: [PATCH] fix up a rather fear-inspiring conditional --- stepmania/src/Song.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index b02631576f..f4bc58e0b7 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -697,13 +697,20 @@ void Song::ReCalculateRadarValuesAndLastBeat() void Song::GetNotes( vector& arrayAddTo, NotesType nt, Difficulty dc, int iMeterLow, int iMeterHigh, CString sDescription, bool bIncludeAutoGen ) const { for( unsigned i=0; im_NotesType == nt ) - if( dc==DIFFICULTY_INVALID || dc==m_apNotes[i]->GetDifficulty() ) - if( iMeterLow==-1 || iMeterLow<=m_apNotes[i]->GetMeter() ) - if( iMeterHigh==-1 || iMeterHigh>=m_apNotes[i]->GetMeter() ) - if( sDescription=="" || sDescription==m_apNotes[i]->GetDescription() ) - if( bIncludeAutoGen || !m_apNotes[i]->IsAutogen() ) - arrayAddTo.push_back( m_apNotes[i] ); + { + if( m_apNotes[i]->m_NotesType != nt ) continue; + if( dc != DIFFICULTY_INVALID && dc != m_apNotes[i]->GetDifficulty() ) + continue; + if( iMeterLow != -1 && iMeterLow > m_apNotes[i]->GetMeter() ) + continue; + if( iMeterHigh != -1 && iMeterHigh < m_apNotes[i]->GetMeter() ) + continue; + if( sDescription != "" && sDescription != m_apNotes[i]->GetDescription() ) + continue; + if( !bIncludeAutoGen && m_apNotes[i]->IsAutogen() ) + continue; + arrayAddTo.push_back( m_apNotes[i] ); + } } Notes* Song::GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen ) const