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.
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
struct Song;
|
||||
|
||||
class DetachedSong {
|
||||
friend DetachedSong map_song_detach(const Song &song);
|
||||
|
||||
/**
|
||||
* An UTF-8-encoded URI referring to the song file. This can
|
||||
* be one of:
|
||||
@@ -60,6 +62,8 @@ class DetachedSong {
|
||||
*/
|
||||
unsigned end_ms;
|
||||
|
||||
explicit DetachedSong(const Song &other);
|
||||
|
||||
public:
|
||||
explicit DetachedSong(const DetachedSong &other)
|
||||
:uri(other.uri),
|
||||
@@ -67,8 +71,6 @@ public:
|
||||
mtime(other.mtime),
|
||||
start_ms(other.start_ms), end_ms(other.end_ms) {}
|
||||
|
||||
explicit DetachedSong(const Song &other);
|
||||
|
||||
explicit DetachedSong(const char *_uri)
|
||||
:uri(_uri),
|
||||
mtime(0), start_ms(0), end_ms(0) {}
|
||||
|
Reference in New Issue
Block a user