diff --git a/src/playlist/PlaylistPlugin.cxx b/src/playlist/PlaylistPlugin.cxx index a7022b203..c453b9719 100644 --- a/src/playlist/PlaylistPlugin.cxx +++ b/src/playlist/PlaylistPlugin.cxx @@ -19,24 +19,23 @@ #include "PlaylistPlugin.hxx" #include "util/StringUtil.hxx" -#include "util/StringView.hxx" bool -PlaylistPlugin::SupportsScheme(StringView scheme) const noexcept +PlaylistPlugin::SupportsScheme(std::string_view scheme) const noexcept { return schemes != nullptr && StringArrayContainsCase(schemes, scheme); } bool -PlaylistPlugin::SupportsSuffix(StringView suffix) const noexcept +PlaylistPlugin::SupportsSuffix(std::string_view suffix) const noexcept { return suffixes != nullptr && StringArrayContainsCase(suffixes, suffix); } bool -PlaylistPlugin::SupportsMimeType(StringView mime_type) const noexcept +PlaylistPlugin::SupportsMimeType(std::string_view mime_type) const noexcept { return mime_types != nullptr && StringArrayContainsCase(mime_types, mime_type); diff --git a/src/playlist/PlaylistPlugin.hxx b/src/playlist/PlaylistPlugin.hxx index be3644caa..d9816a937 100644 --- a/src/playlist/PlaylistPlugin.hxx +++ b/src/playlist/PlaylistPlugin.hxx @@ -24,9 +24,10 @@ #include "thread/Mutex.hxx" #include "util/Compiler.h" +#include + struct ConfigBlock; struct Tag; -struct StringView; class SongEnumerator; struct PlaylistPlugin { @@ -120,19 +121,19 @@ struct PlaylistPlugin { * Does the plugin announce the specified URI scheme? */ gcc_pure gcc_nonnull_all - bool SupportsScheme(StringView scheme) const noexcept; + bool SupportsScheme(std::string_view scheme) const noexcept; /** * Does the plugin announce the specified file name suffix? */ gcc_pure gcc_nonnull_all - bool SupportsSuffix(StringView suffix) const noexcept; + bool SupportsSuffix(std::string_view suffix) const noexcept; /** * Does the plugin announce the specified MIME type? */ gcc_pure gcc_nonnull_all - bool SupportsMimeType(StringView mime_type) const noexcept; + bool SupportsMimeType(std::string_view mime_type) const noexcept; }; /**