From c34f3c9b94aaadd1377f598bfe25f34dbf08553a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Jun 2022 10:38:38 +0200 Subject: [PATCH] tag/Handler: use StringIsEqualIgnoreCase() --- src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx | 5 ++--- src/tag/Handler.cxx | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx index 7b67ea6c8..f64832b23 100644 --- a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx +++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx @@ -33,7 +33,7 @@ #include "TagFile.hxx" #include "fs/Traits.hxx" #include "fs/AllocatedPath.hxx" -#include "util/StringView.hxx" +#include "util/StringCompare.hxx" #include @@ -77,8 +77,7 @@ public: void ExtractCuesheetTagHandler::OnPair(std::string_view name, std::string_view value) noexcept { - if (cuesheet.empty() && - StringView{name}.EqualsIgnoreCase("cuesheet"sv)) + if (cuesheet.empty() && StringIsEqualIgnoreCase(name, "cuesheet"sv)) cuesheet = value; } diff --git a/src/tag/Handler.cxx b/src/tag/Handler.cxx index b482df4ef..07b81e2ea 100644 --- a/src/tag/Handler.cxx +++ b/src/tag/Handler.cxx @@ -21,6 +21,7 @@ #include "Builder.hxx" #include "pcm/AudioFormat.hxx" #include "util/CharUtil.hxx" +#include "util/StringCompare.hxx" #include "util/StringView.hxx" #include @@ -81,7 +82,7 @@ AddTagHandler::OnTag(TagType type, std::string_view value) noexcept void FullTagHandler::OnPair(std::string_view name, std::string_view) noexcept { - if (StringView{name}.EqualsIgnoreCase("cuesheet"sv)) + if (StringIsEqualIgnoreCase(name, "cuesheet"sv)) tag.SetHasPlaylist(true); }