diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx index 6e12e77ff..d04f1fc16 100644 --- a/src/playlist/cue/CueParser.cxx +++ b/src/playlist/cue/CueParser.cxx @@ -19,8 +19,8 @@ #include "CueParser.hxx" #include "tag/ParseName.hxx" -#include "util/StringView.hxx" #include "util/CharUtil.hxx" +#include "util/StringView.hxx" #include #include @@ -110,7 +110,7 @@ CueParser::GetCurrentTag() noexcept } static bool -IsDigit(StringView s) noexcept +IsDigit(std::string_view s) noexcept { return !s.empty() && IsDigitASCII(s.front()); } @@ -174,10 +174,12 @@ CueParser::Commit() noexcept } void -CueParser::Feed(StringView src) noexcept +CueParser::Feed(std::string_view _src) noexcept { assert(!end); + StringView src{_src}; + auto command = cue_next_token(src); if (command == nullptr) return; diff --git a/src/playlist/cue/CueParser.hxx b/src/playlist/cue/CueParser.hxx index 5ddfa2e1d..50deb43b7 100644 --- a/src/playlist/cue/CueParser.hxx +++ b/src/playlist/cue/CueParser.hxx @@ -24,10 +24,9 @@ #include "tag/Builder.hxx" #include "util/Compiler.h" -#include #include - -struct StringView; +#include +#include class CueParser { enum { @@ -106,7 +105,7 @@ public: * Feed a text line from the CUE file into the parser. Call * Get() after this to see if a song has been finished. */ - void Feed(StringView line) noexcept; + void Feed(std::string_view line) noexcept; /** * Tell the parser that the end of the file has been reached. Call