summaryrefslogtreecommitdiff
path: root/src/DetachedSong.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-08 09:45:37 +0100
committerMax Kellermann <max@musicpd.org>2017-02-08 09:45:37 +0100
commit4f0fe66f698b9f13a85f618e2969573c9ed6f2d5 (patch)
tree1473a9fcaf0712d30f7e84ca05987c3263e83967 /src/DetachedSong.hxx
parent76380b2b45c27baa2ab79d5e18e4d0e9f8deb0af (diff)
DetachedSong: make the LightSong constructor public
Sometimes, it's useful to construct a DetachedSong from a LightSong even without having real_uri initialized.
Diffstat (limited to 'src/DetachedSong.hxx')
-rw-r--r--src/DetachedSong.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DetachedSong.hxx b/src/DetachedSong.hxx
index d6fcab698..be3b9355d 100644
--- a/src/DetachedSong.hxx
+++ b/src/DetachedSong.hxx
@@ -76,8 +76,6 @@ class DetachedSong {
*/
SongTime end_time = SongTime::zero();
- explicit DetachedSong(const LightSong &other);
-
public:
explicit DetachedSong(const char *_uri)
:uri(_uri) {}
@@ -93,6 +91,13 @@ public:
:uri(std::forward<U>(_uri)),
tag(std::move(_tag)) {}
+ /**
+ * Copy data from a #LightSong instance. Usually, you should
+ * call DatabaseDetachSong() instead, which initializes
+ * #real_uri properly using Storage::MapUTF8().
+ */
+ explicit DetachedSong(const LightSong &other);
+
~DetachedSong();
gcc_pure