Replace qAsConst with C++17 std::as_const
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
@@ -416,7 +417,7 @@ void PlaylistListContainer::Delete() {
|
||||
}
|
||||
|
||||
// Unfavorite the playlists
|
||||
for (const int id : qAsConst(ids)) {
|
||||
for (const int id : std::as_const(ids)) {
|
||||
app_->playlist_manager()->Favorite(id, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user