diff --git a/src/tag/MixRampParser.cxx b/src/tag/MixRampParser.cxx index d1cf8cd57..df0b0415c 100644 --- a/src/tag/MixRampParser.cxx +++ b/src/tag/MixRampParser.cxx @@ -21,7 +21,6 @@ #include "VorbisComment.hxx" #include "MixRampInfo.hxx" #include "util/ASCII.hxx" -#include "util/StringView.hxx" #include @@ -56,10 +55,10 @@ ParseMixRampTag(MixRampInfo &info, const char *value; [[gnu::pure]] - StringView operator[](const char *n) const noexcept { + std::string_view operator[](const char *n) const noexcept { return StringEqualsCaseASCII(name, n) ? value - : nullptr; + : std::string_view{}; } }; @@ -67,13 +66,13 @@ ParseMixRampTag(MixRampInfo &info, } bool -ParseMixRampVorbis(MixRampInfo &info, StringView entry) noexcept +ParseMixRampVorbis(MixRampInfo &info, std::string_view entry) noexcept { struct VorbisCommentEntry { - StringView entry; + std::string_view entry; [[gnu::pure]] - StringView operator[](StringView n) const noexcept { + std::string_view operator[](std::string_view n) const noexcept { return GetVorbisCommentValue(entry, n); } }; diff --git a/src/tag/MixRampParser.hxx b/src/tag/MixRampParser.hxx index 50a47d3aa..7bfa89b16 100644 --- a/src/tag/MixRampParser.hxx +++ b/src/tag/MixRampParser.hxx @@ -19,7 +19,8 @@ #pragma once -struct StringView; +#include + class MixRampInfo; bool @@ -27,4 +28,4 @@ ParseMixRampTag(MixRampInfo &info, const char *name, const char *value) noexcept; bool -ParseMixRampVorbis(MixRampInfo &info, StringView entry) noexcept; +ParseMixRampVorbis(MixRampInfo &info, std::string_view entry) noexcept;