diff options
author | Max Kellermann <max@duempel.org> | 2014-01-14 23:28:36 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-17 23:51:14 +0100 |
commit | 61b01f82ef0582d194d8adfa137a09f71ce728c1 (patch) | |
tree | a0e0bc303a89bfcf6011dab17eba1d6b7adb2fa8 /src/DetachedSong.hxx | |
parent | 75b847132afb75d50b3c7041f298fb4372ccd1c2 (diff) |
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/DetachedSong.hxx')
-rw-r--r-- | src/DetachedSong.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DetachedSong.hxx b/src/DetachedSong.hxx index a99cbb4c8..7d841a4c2 100644 --- a/src/DetachedSong.hxx +++ b/src/DetachedSong.hxx @@ -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) {} |