db/upnp: pass std::string_view to songPath()

This commit is contained in:
Max Kellermann 2024-01-04 13:22:31 +01:00
parent 714dbc9294
commit 1789b56a85
1 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,8 @@
#include "util/SplitString.hxx"
#include "config/Block.hxx"
#include <fmt/core.h>
#include <cassert>
#include <string>
#include <utility>
@ -318,10 +320,10 @@ visitSong(const UPnPDirObject &meta, const char *path,
* directory name would fit.
*/
static std::string
songPath(const std::string &servername,
const std::string &objid) noexcept
songPath(const std::string_view servername,
const std::string_view objid) noexcept
{
return servername + "/" + rootid + "/" + objid;
return fmt::format("{}/{}/{}", servername, rootid, objid);
}
void