summaryrefslogtreecommitdiff
path: root/src/queue
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-11-26 11:46:14 +0100
committerMax Kellermann <max@musicpd.org>2017-11-26 12:06:38 +0100
commitb13b023c6b9810ecad0f00925e622c7aa4a2f7d9 (patch)
tree7ac0e878fa24e82a7276587689fda0cc34b0e6c9 /src/queue
parentb652ad9568051cd2e4f115af869c083e8aba8377 (diff)
player/Control: wrap DetachedSong* in std::unique_ptr
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/Playlist.cxx4
-rw-r--r--src/queue/PlaylistControl.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/queue/Playlist.cxx b/src/queue/Playlist.cxx
index 8cdcc9a74..0b68f0298 100644
--- a/src/queue/Playlist.cxx
+++ b/src/queue/Playlist.cxx
@@ -56,7 +56,7 @@ playlist::QueueSongOrder(PlayerControl &pc, unsigned order)
FormatDebug(playlist_domain, "queue song %i:\"%s\"",
queued, song.GetURI());
- pc.LockEnqueueSong(new DetachedSong(song));
+ pc.LockEnqueueSong(std::make_unique<DetachedSong>(song));
}
void
@@ -163,7 +163,7 @@ playlist::PlayOrder(PlayerControl &pc, unsigned order)
current = order;
- pc.Play(new DetachedSong(song));
+ pc.Play(std::make_unique<DetachedSong>(song));
SongStarted();
}
diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx
index 4b17386ae..c744e42c8 100644
--- a/src/queue/PlaylistControl.cxx
+++ b/src/queue/PlaylistControl.cxx
@@ -234,7 +234,7 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time)
queued = -1;
try {
- pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time);
+ pc.LockSeek(std::make_unique<DetachedSong>(queue.GetOrder(i)), seek_time);
} catch (...) {
UpdateQueuedSong(pc, queued_song);
throw;