From 6440df60aa587364d77fcad4b105884cbbf12b4c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Jun 2022 20:57:46 +0200 Subject: [PATCH] output/jack: use std::string_view --- src/output/plugins/JackOutputPlugin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index 3bec12836..214253e2c 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -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)