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/DatabaseSong.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/DatabaseSong.cxx') diff --git a/src/DatabaseSong.cxx b/src/DatabaseSong.cxx index 9afd109cb..a8f2188cc 100644 --- a/src/DatabaseSong.cxx +++ b/src/DatabaseSong.cxx @@ -22,6 +22,7 @@ #include "DatabaseGlue.hxx" #include "DatabasePlugin.hxx" #include "DetachedSong.hxx" +#include "Mapper.hxx" DetachedSong * DatabaseDetachSong(const char *uri, Error &error) @@ -34,7 +35,7 @@ DatabaseDetachSong(const char *uri, Error &error) if (tmp == nullptr) return nullptr; - DetachedSong *song = new DetachedSong(*tmp); + DetachedSong *song = new DetachedSong(map_song_detach(*tmp)); db->ReturnSong(tmp); return song; } -- cgit v1.2.3