lib/xiph/VorbisPicture: use std::string_view instead of StringView
This commit is contained in:
parent
f045cf43e4
commit
3699514d18
@ -21,20 +21,19 @@
|
||||
#include "lib/crypto/Base64.hxx"
|
||||
#include "tag/Id3Picture.hxx"
|
||||
#include "tag/Handler.hxx"
|
||||
#include "util/StringView.hxx"
|
||||
#include "config.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
void
|
||||
ScanVorbisPicture(StringView value, TagHandler &handler) noexcept
|
||||
ScanVorbisPicture(std::string_view value, TagHandler &handler) noexcept
|
||||
{
|
||||
#ifdef HAVE_BASE64
|
||||
if (value.size > 1024 * 1024)
|
||||
if (value.size() > 1024 * 1024)
|
||||
/* ignore image files which are too huge */
|
||||
return;
|
||||
|
||||
size_t debase64_size = CalculateBase64OutputSize(value.size);
|
||||
size_t debase64_size = CalculateBase64OutputSize(value.size());
|
||||
auto debase64_buffer = std::make_unique<std::byte[]>(debase64_size);
|
||||
|
||||
try {
|
||||
|
@ -20,10 +20,11 @@
|
||||
#ifndef MPD_VORBIS_PICTURE_HXX
|
||||
#define MPD_VORBIS_PICTURE_HXX
|
||||
|
||||
struct StringView;
|
||||
#include <string_view>
|
||||
|
||||
class TagHandler;
|
||||
|
||||
void
|
||||
ScanVorbisPicture(StringView value, TagHandler &handler) noexcept;
|
||||
ScanVorbisPicture(std::string_view value, TagHandler &handler) noexcept;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user