From ddfd92e547e08487bbe6fe86e674bf543a33b97f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Apr 2020 19:40:17 +0200 Subject: db/simple/PrefixedLightSong: templatize the constructor --- src/db/plugins/simple/PrefixedLightSong.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/db/plugins/simple') 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 + PrefixedLightSong(const LightSong &song, B &&base) :LightSong(song), - buffer(PathTraitsUTF8::Build(base, GetURI().c_str())) { + buffer(PathTraitsUTF8::Build(std::forward(base), + GetURI())) + { uri = buffer.c_str(); directory = nullptr; } -- cgit v1.2.3