Use std::any_of

This commit is contained in:
Jonas Kvinge
2021-06-21 19:52:37 +02:00
parent 6a7959547e
commit c61d1ce6b4
12 changed files with 55 additions and 70 deletions

View File

@@ -21,6 +21,8 @@
#include "config.h"
#include <algorithm>
#include <QObject>
#include <QtConcurrentMap>
#include <QFuture>
@@ -56,12 +58,8 @@ void TagFetcher::StartFetch(const SongList &songs) {
songs_ = songs;
bool have_fingerprints = true;
for (const Song &song : songs_) {
if (song.fingerprint().isEmpty()) {
have_fingerprints = false;
break;
}
if (std::any_of(songs.begin(), songs.end(), [](const Song &song){ return song.fingerprint().isEmpty(); })) {
have_fingerprints = false;
}
if (have_fingerprints) {