mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-28 01:01:21 +01:00
Use std::make_shared
This commit is contained in:
parent
d499bfab8a
commit
59b48ceb4a
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user