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 "lib/crypto/Base64.hxx"
|
||||||
#include "tag/Id3Picture.hxx"
|
#include "tag/Id3Picture.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
void
|
void
|
||||||
ScanVorbisPicture(StringView value, TagHandler &handler) noexcept
|
ScanVorbisPicture(std::string_view value, TagHandler &handler) noexcept
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BASE64
|
#ifdef HAVE_BASE64
|
||||||
if (value.size > 1024 * 1024)
|
if (value.size() > 1024 * 1024)
|
||||||
/* ignore image files which are too huge */
|
/* ignore image files which are too huge */
|
||||||
return;
|
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);
|
auto debase64_buffer = std::make_unique<std::byte[]>(debase64_size);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#ifndef MPD_VORBIS_PICTURE_HXX
|
#ifndef MPD_VORBIS_PICTURE_HXX
|
||||||
#define MPD_VORBIS_PICTURE_HXX
|
#define MPD_VORBIS_PICTURE_HXX
|
||||||
|
|
||||||
struct StringView;
|
#include <string_view>
|
||||||
|
|
||||||
class TagHandler;
|
class TagHandler;
|
||||||
|
|
||||||
void
|
void
|
||||||
ScanVorbisPicture(StringView value, TagHandler &handler) noexcept;
|
ScanVorbisPicture(std::string_view value, TagHandler &handler) noexcept;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user