playlist/{asx,cue,rss,xspf}: use std::string_view instead of StringView
This commit is contained in:
parent
74780131bd
commit
6c8a85a391
|
@ -23,7 +23,6 @@
|
||||||
#include "tag/Builder.hxx"
|
#include "tag/Builder.hxx"
|
||||||
#include "tag/Table.hxx"
|
#include "tag/Table.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
#include "lib/expat/ExpatParser.hxx"
|
#include "lib/expat/ExpatParser.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,8 +127,7 @@ asx_end_element(void *user_data, const XML_Char *element_name)
|
||||||
case AsxParser::TAG:
|
case AsxParser::TAG:
|
||||||
if (!parser->value.empty())
|
if (!parser->value.empty())
|
||||||
parser->tag_builder.AddItem(parser->tag_type,
|
parser->tag_builder.AddItem(parser->tag_type,
|
||||||
StringView(parser->value.data(),
|
parser->value);
|
||||||
parser->value.length()));
|
|
||||||
parser->state = AsxParser::ENTRY;
|
parser->state = AsxParser::ENTRY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include "../SongEnumerator.hxx"
|
#include "../SongEnumerator.hxx"
|
||||||
#include "../cue/CueParser.hxx"
|
#include "../cue/CueParser.hxx"
|
||||||
#include "input/TextInputStream.hxx"
|
#include "input/TextInputStream.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
|
|
||||||
class CuePlaylist final : public SongEnumerator {
|
class CuePlaylist final : public SongEnumerator {
|
||||||
TextInputStream tis;
|
TextInputStream tis;
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include "../MemorySongEnumerator.hxx"
|
#include "../MemorySongEnumerator.hxx"
|
||||||
#include "tag/Builder.hxx"
|
#include "tag/Builder.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
#include "lib/expat/ExpatParser.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:
|
case RssParser::ITEM:
|
||||||
if (parser->tag_type != TAG_NUM_OF_ITEM_TYPES)
|
if (parser->tag_type != TAG_NUM_OF_ITEM_TYPES)
|
||||||
parser->tag_builder.AddItem(parser->tag_type,
|
parser->tag_builder.AddItem(parser->tag_type,
|
||||||
StringView(s, len));
|
std::string_view(s, len));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "input/InputStream.hxx"
|
#include "input/InputStream.hxx"
|
||||||
#include "tag/Builder.hxx"
|
#include "tag/Builder.hxx"
|
||||||
#include "tag/Table.hxx"
|
#include "tag/Table.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
#include "lib/expat/ExpatParser.hxx"
|
#include "lib/expat/ExpatParser.hxx"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -158,8 +157,7 @@ xspf_end_element(void *user_data, const XML_Char *element_name)
|
||||||
case XspfParser::TAG:
|
case XspfParser::TAG:
|
||||||
if (!parser->value.empty())
|
if (!parser->value.empty())
|
||||||
parser->tag_builder.AddItem(parser->tag_type,
|
parser->tag_builder.AddItem(parser->tag_type,
|
||||||
StringView(parser->value.data(),
|
parser->value);
|
||||||
parser->value.length()));
|
|
||||||
|
|
||||||
parser->state = XspfParser::TRACK;
|
parser->state = XspfParser::TRACK;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue