From 3f1bed592596347d943cca1de137fcdf2bd8cc23 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 11 Feb 2011 01:55:44 -0500 Subject: [PATCH] Duplicate step check with #CREDIT. --- src/SongUtil.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SongUtil.cpp b/src/SongUtil.cpp index 11b102ddcd..e9e59fedb0 100644 --- a/src/SongUtil.cpp +++ b/src/SongUtil.cpp @@ -293,7 +293,7 @@ static RString RemoveInitialWhitespace( RString s ) void SongUtil::DeleteDuplicateSteps( Song *pSong, vector &vSteps ) { /* vSteps have the same StepsType and Difficulty. Delete them if they have the - * same m_sDescription, m_iMeter and SMNoteData. */ + * same m_sDescription, m_sCredit, m_iMeter and SMNoteData. */ CHECKPOINT; for( unsigned i=0; i &vSteps ) if( s1->GetDescription() != s2->GetDescription() ) continue; + if( s1->GetCredit() != s2->GetCredit() ) + continue; if( s1->GetMeter() != s2->GetMeter() ) continue; /* Compare, ignoring whitespace. */ @@ -317,8 +319,8 @@ void SongUtil::DeleteDuplicateSteps( Song *pSong, vector &vSteps ) if( RemoveInitialWhitespace(sSMNoteData1) != RemoveInitialWhitespace(sSMNoteData2) ) continue; - LOG->Trace("Removed %p duplicate steps in song \"%s\" with description \"%s\" and meter \"%i\"", - s2, pSong->GetSongDir().c_str(), s1->GetDescription().c_str(), s1->GetMeter() ); + LOG->Trace("Removed %p duplicate steps in song \"%s\" with description \"%s\", step author \"%s\", and meter \"%i\"", + s2, pSong->GetSongDir().c_str(), s1->GetDescription().c_str(), s1->GetCredit().c_str(), s1->GetMeter() ); pSong->DeleteSteps( s2, false );