diff --git a/src/TagPrint.cxx b/src/TagPrint.cxx index e4d80e9bf..e5ecb4b35 100644 --- a/src/TagPrint.cxx +++ b/src/TagPrint.cxx @@ -35,8 +35,9 @@ tag_print_types(Response &r) noexcept } void -tag_print(Response &r, TagType type, StringView value) noexcept +tag_print(Response &r, TagType type, StringView _value) noexcept { + const std::string_view value{_value}; r.Fmt(FMT_STRING("{}: {}\n"), tag_item_names[type], value); } diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx index 4a14e9a2a..3b9a6339e 100644 --- a/src/command/FileCommands.cxx +++ b/src/command/FileCommands.cxx @@ -126,7 +126,8 @@ public: explicit PrintCommentHandler(Response &_response) noexcept :NullTagHandler(WANT_PAIR), response(_response) {} - void OnPair(StringView key, StringView value) noexcept override { + void OnPair(StringView _key, StringView _value) noexcept override { + const std::string_view key{_key}, value{_value}; if (IsValidName(key) && IsValidValue(value)) response.Fmt(FMT_STRING("{}: {}\n"), key, value); }