playlist/{asx,cue,rss,xspf}: use std::string_view instead of StringView

This commit is contained in:
Max Kellermann 2022-07-04 14:35:49 +02:00
parent 74780131bd
commit 6c8a85a391
4 changed files with 3 additions and 9 deletions

View File

@ -23,7 +23,6 @@
#include "tag/Builder.hxx"
#include "tag/Table.hxx"
#include "util/ASCII.hxx"
#include "util/StringView.hxx"
#include "lib/expat/ExpatParser.hxx"
/**
@ -128,8 +127,7 @@ asx_end_element(void *user_data, const XML_Char *element_name)
case AsxParser::TAG:
if (!parser->value.empty())
parser->tag_builder.AddItem(parser->tag_type,
StringView(parser->value.data(),
parser->value.length()));
parser->value);
parser->state = AsxParser::ENTRY;
break;
}

View File

@ -22,7 +22,6 @@
#include "../SongEnumerator.hxx"
#include "../cue/CueParser.hxx"
#include "input/TextInputStream.hxx"
#include "util/StringView.hxx"
class CuePlaylist final : public SongEnumerator {
TextInputStream tis;

View File

@ -22,7 +22,6 @@
#include "../MemorySongEnumerator.hxx"
#include "tag/Builder.hxx"
#include "util/ASCII.hxx"
#include "util/StringView.hxx"
#include "lib/expat/ExpatParser.hxx"
/**
@ -126,7 +125,7 @@ rss_char_data(void *user_data, const XML_Char *s, int len)
case RssParser::ITEM:
if (parser->tag_type != TAG_NUM_OF_ITEM_TYPES)
parser->tag_builder.AddItem(parser->tag_type,
StringView(s, len));
std::string_view(s, len));
break;
}

View File

@ -24,7 +24,6 @@
#include "input/InputStream.hxx"
#include "tag/Builder.hxx"
#include "tag/Table.hxx"
#include "util/StringView.hxx"
#include "lib/expat/ExpatParser.hxx"
#include <string.h>
@ -158,8 +157,7 @@ xspf_end_element(void *user_data, const XML_Char *element_name)
case XspfParser::TAG:
if (!parser->value.empty())
parser->tag_builder.AddItem(parser->tag_type,
StringView(parser->value.data(),
parser->value.length()));
parser->value);
parser->state = XspfParser::TRACK;
break;