From 59b48ceb4a6235e5436ca3a621584c6d5a5a9508 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 2 Feb 2021 21:08:12 +0100 Subject: [PATCH] Use std::make_shared --- src/collection/collectiondirectorymodel.cpp | 2 +- src/playlist/playlist.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collection/collectiondirectorymodel.cpp b/src/collection/collectiondirectorymodel.cpp index 70e9b7eda..8d954f0ea 100644 --- a/src/collection/collectiondirectorymodel.cpp +++ b/src/collection/collectiondirectorymodel.cpp @@ -51,7 +51,7 @@ void CollectionDirectoryModel::DirectoryDiscovered(const Directory &dir) { QStandardItem *item = new QStandardItem(dir.path); item->setData(dir.id, kIdRole); item->setIcon(dir_icon_); - storage_ << std::shared_ptr(new FilesystemMusicStorage(dir.path)); + storage_ << std::make_shared(dir.path); appendRow(item); } diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index e3bbc5eed..5f2cfe2c1 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -1105,7 +1105,7 @@ void Playlist::InsertInternetItems(InternetService *service, const SongList &son PlaylistItemList playlist_items; for (const Song &song : songs) { - playlist_items << std::shared_ptr(new InternetPlaylistItem(service, song)); + playlist_items << std::make_shared(service, song); } InsertItems(playlist_items, pos, play_now, enqueue, enqueue_next);