Replace qAsConst with C++17 std::as_const

This commit is contained in:
Jonas Kvinge
2021-08-22 23:26:53 +02:00
parent c076933b52
commit 72d381e9ed
7 changed files with 17 additions and 13 deletions

View File

@@ -23,6 +23,7 @@
#include <memory>
#include <functional>
#include <utility>
#include <QtGlobal>
#include <QObject>
@@ -496,7 +497,7 @@ void PlaylistManager::SongsDiscovered(const SongList &songs) {
// Some songs might've changed in the collection, let's update any playlist items we have that match those songs
for (const Song &song : songs) {
for (const Data &data : qAsConst(playlists_)) {
for (const Data &data : std::as_const(playlists_)) {
PlaylistItemList items = data.p->collection_items_by_id(song.id());
for (PlaylistItemPtr item : items) {
if (item->Metadata().directory_id() != song.directory_id()) continue;