Replace qSort/qStableSort/qSwap

This commit is contained in:
Jonas Kvinge
2018-10-19 20:18:46 +02:00
parent 0969e7f504
commit 0cda4e27aa
24 changed files with 115 additions and 35 deletions

View File

@@ -21,6 +21,8 @@
#include "config.h"
#include <algorithm>
#include <taglib/fileref.h>
#include <taglib/id3v1genres.h>
@@ -66,6 +68,8 @@
#include "covermanager/albumcoverloader.h"
#include "tagreadermessages.pb.h"
using std::sort;
const QStringList Song::kColumns = QStringList() << "title"
<< "album"
<< "artist"
@@ -495,7 +499,7 @@ int CompareSongsName(const Song &song1, const Song &song2) {
void Song::SortSongsListAlphabetically(SongList *songs) {
Q_ASSERT(songs);
qSort(songs->begin(), songs->end(), CompareSongsName);
std::sort(songs->begin(), songs->end(), CompareSongsName);
}
void Song::Init(const QString &title, const QString &artist, const QString &album, qint64 length_nanosec) {