diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-01-19 09:24:59 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-01-19 09:24:59 +0000 |
| commit | d0a6dc46af1406dcb56b94d6693a3aa5c19b777f (patch) | |
| tree | 3b1f7779cccd56b211a871bae066a008b5f93640 /src | |
| parent | 836f258d66c7824c292bc35b1c42a3eed2cb8baa (diff) | |
| download | qmmp-d0a6dc46af1406dcb56b94d6693a3aa5c19b777f.tar.gz qmmp-d0a6dc46af1406dcb56b94d6693a3aa5c19b777f.tar.bz2 qmmp-d0a6dc46af1406dcb56b94d6693a3aa5c19b777f.zip | |
fixed duplicates removal
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2548 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 0f158fec6..689208ef9 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -906,10 +906,12 @@ void PlayListModel::removeDuplicates() { for(int i = 0; i < m_items.size(); ++i) { - for(int j = i + 1; j < m_items.size(); ++j) + int j = m_items.size() - 1; + while(j > i) { if(m_items.at(i)->url() == m_items.at(j)->url()) removeItem(m_items.at(j)); + j--; } } } |
