output/jack: use std::string_view

This commit is contained in:
Max Kellermann 2022-06-30 20:57:46 +02:00
parent b806b0a97f
commit 6440df60aa

View File

@ -199,11 +199,11 @@ static unsigned
parse_port_list(const char *source, std::string dest[])
{
unsigned n = 0;
for (auto i : IterableSplitString(source, ',')) {
for (const std::string_view i : IterableSplitString(source, ',')) {
if (n >= MAX_PORTS)
throw std::runtime_error("too many port names");
dest[n++] = std::string(i.data, i.size);
dest[n++] = i;
}
if (n == 0)