Commit 4f0fe66f authored by Max Kellermann's avatar Max Kellermann

DetachedSong: make the LightSong constructor public

Sometimes, it's useful to construct a DetachedSong from a LightSong even without having real_uri initialized.
parent 76380b2b
...@@ -76,8 +76,6 @@ class DetachedSong { ...@@ -76,8 +76,6 @@ class DetachedSong {
*/ */
SongTime end_time = SongTime::zero(); SongTime end_time = SongTime::zero();
explicit DetachedSong(const LightSong &other);
public: public:
explicit DetachedSong(const char *_uri) explicit DetachedSong(const char *_uri)
:uri(_uri) {} :uri(_uri) {}
...@@ -93,6 +91,13 @@ public: ...@@ -93,6 +91,13 @@ public:
:uri(std::forward<U>(_uri)), :uri(std::forward<U>(_uri)),
tag(std::move(_tag)) {} 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(); ~DetachedSong();
gcc_pure gcc_pure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment