summaryrefslogtreecommitdiff
path: root/src/db/plugins/simple
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-04-02 19:40:17 +0200
committerMax Kellermann <max@musicpd.org>2020-04-02 19:51:41 +0200
commitddfd92e547e08487bbe6fe86e674bf543a33b97f (patch)
tree796d13bde4b73de871deb0f781c80a304a7866d5 /src/db/plugins/simple
parentd5fd3094848da0b7d34187c4e8ff5e05f3323a35 (diff)
db/simple/PrefixedLightSong: templatize the constructor
Diffstat (limited to 'src/db/plugins/simple')
-rw-r--r--src/db/plugins/simple/PrefixedLightSong.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/db/plugins/simple/PrefixedLightSong.hxx b/src/db/plugins/simple/PrefixedLightSong.hxx
index 37a2bf6b2..432df77af 100644
--- a/src/db/plugins/simple/PrefixedLightSong.hxx
+++ b/src/db/plugins/simple/PrefixedLightSong.hxx
@@ -29,9 +29,12 @@ class PrefixedLightSong : public LightSong {
std::string buffer;
public:
- PrefixedLightSong(const LightSong &song, const char *base)
+ template<typename B>
+ PrefixedLightSong(const LightSong &song, B &&base)
:LightSong(song),
- buffer(PathTraitsUTF8::Build(base, GetURI().c_str())) {
+ buffer(PathTraitsUTF8::Build(std::forward<B>(base),
+ GetURI()))
+ {
uri = buffer.c_str();
directory = nullptr;
}