use data() instead of &[0]
No need for C pointer manipulation. Removed data() for string_view as [] can be used without. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
0c98d93e9a
commit
3f133dd586
|
@ -43,7 +43,7 @@ cue_next_word(std::string_view &src) noexcept
|
|||
static std::string_view
|
||||
cue_next_quoted(std::string_view &src) noexcept
|
||||
{
|
||||
assert(src.data()[-1] == '"');
|
||||
assert(src[-1] == '"');
|
||||
|
||||
auto end = src.find('"');
|
||||
if (end == src.npos)
|
||||
|
|
|
@ -106,7 +106,7 @@ embcue_playlist_open_uri(const char *uri,
|
|||
|
||||
playlist->cuesheet = std::move(extract_cuesheet.cuesheet);
|
||||
|
||||
playlist->next = &playlist->cuesheet[0];
|
||||
playlist->next = playlist->cuesheet.data();
|
||||
playlist->parser = std::make_unique<CueParser>();
|
||||
|
||||
return playlist;
|
||||
|
|
Loading…
Reference in New Issue