DetachedSong: make the LightSong constructor public

Sometimes, it's useful to construct a DetachedSong from a LightSong
even without having real_uri initialized.
This commit is contained in:
Max Kellermann 2017-02-08 09:45:37 +01:00
parent 76380b2b45
commit 4f0fe66f69

View File

@ -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:
: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