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:
Rosen Penev 2022-07-20 13:49:18 -07:00
parent 0c98d93e9a
commit 3f133dd586
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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;