From 61b01f82ef0582d194d8adfa137a09f71ce728c1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2014 23:28:36 +0100 Subject: Mapper: add function map_song_detach() Make the DetachedSong(Song) conversion constructor private. Everybody should use map_song_detach() which will take over more responsibilities soon. --- src/DatabaseQueue.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/DatabaseQueue.cxx') diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx index 697771273..0ed073285 100644 --- a/src/DatabaseQueue.cxx +++ b/src/DatabaseQueue.cxx @@ -24,6 +24,7 @@ #include "Partition.hxx" #include "util/Error.hxx" #include "DetachedSong.hxx" +#include "Mapper.hxx" #include @@ -31,7 +32,8 @@ static bool AddToQueue(Partition &partition, const Song &song, Error &error) { PlaylistResult result = - partition.playlist.AppendSong(partition.pc, DetachedSong(song), + partition.playlist.AppendSong(partition.pc, + map_song_detach(song), nullptr); if (result != PlaylistResult::SUCCESS) { error.Set(playlist_domain, int(result), "Playlist error"); -- cgit v1.2.3