1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-28 09:10:58 +01:00

Use std::make_shared

This commit is contained in:
Jonas Kvinge 2021-02-02 21:08:12 +01:00
parent d499bfab8a
commit 59b48ceb4a
2 changed files with 2 additions and 2 deletions

View File

@ -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<MusicStorage>(new FilesystemMusicStorage(dir.path));
storage_ << std::make_shared<FilesystemMusicStorage>(dir.path);
appendRow(item);
}

View File

@ -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<PlaylistItem>(new InternetPlaylistItem(service, song));
playlist_items << std::make_shared<InternetPlaylistItem>(service, song);
}
InsertItems(playlist_items, pos, play_now, enqueue, enqueue_next);