aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseSong.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-14 23:28:36 +0100
committerMax Kellermann <max@duempel.org>2014-01-17 23:51:14 +0100
commit61b01f82ef0582d194d8adfa137a09f71ce728c1 (patch)
treea0e0bc303a89bfcf6011dab17eba1d6b7adb2fa8 /src/DatabaseSong.cxx
parent75b847132afb75d50b3c7041f298fb4372ccd1c2 (diff)
downloadmpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.tar.gz
mpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.tar.xz
mpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.zip
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.
Diffstat (limited to 'src/DatabaseSong.cxx')
-rw-r--r--src/DatabaseSong.cxx3
1 files changed, 2 insertions, 1 deletions
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;
}