db/simple/PrefixedLightSong: templatize the constructor

This commit is contained in:
Max Kellermann 2020-04-02 19:40:17 +02:00
parent d5fd309484
commit ddfd92e547

View File

@ -29,9 +29,12 @@ class PrefixedLightSong : public LightSong {
std::string buffer; std::string buffer;
public: public:
PrefixedLightSong(const LightSong &song, const char *base) template<typename B>
PrefixedLightSong(const LightSong &song, B &&base)
:LightSong(song), :LightSong(song),
buffer(PathTraitsUTF8::Build(base, GetURI().c_str())) { buffer(PathTraitsUTF8::Build(std::forward<B>(base),
GetURI()))
{
uri = buffer.c_str(); uri = buffer.c_str();
directory = nullptr; directory = nullptr;
} }