tag/VorbisComment: use std::string_view
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
* the comment value into the tag.
|
||||
*/
|
||||
static bool
|
||||
vorbis_copy_comment(StringView comment,
|
||||
StringView name, TagType tag_type,
|
||||
vorbis_copy_comment(std::string_view comment,
|
||||
std::string_view name, TagType tag_type,
|
||||
TagHandler &handler) noexcept
|
||||
{
|
||||
const auto value = GetVorbisCommentValue(comment, name);
|
||||
if (!value.IsNull()) {
|
||||
if (value.data() != nullptr) {
|
||||
handler.OnTag(tag_type, value);
|
||||
return true;
|
||||
}
|
||||
|
@@ -68,8 +68,8 @@ vorbis_scan_comment(StringView comment, TagHandler &handler) noexcept
|
||||
{
|
||||
const auto picture_b64 = handler.WantPicture()
|
||||
? GetVorbisCommentValue(comment, "METADATA_BLOCK_PICTURE")
|
||||
: nullptr;
|
||||
if (!picture_b64.IsNull())
|
||||
: std::string_view{};
|
||||
if (picture_b64.data() != nullptr)
|
||||
return ScanVorbisPicture(picture_b64, handler);
|
||||
|
||||
ScanVorbisComment(comment, handler);
|
||||
|
Reference in New Issue
Block a user