tag/*: use std::string_view instead of StringView

This commit is contained in:
Max Kellermann
2022-07-04 14:52:56 +02:00
parent c7a8fc91c0
commit 683f0da2e7
10 changed files with 34 additions and 37 deletions

View File

@@ -24,7 +24,6 @@
#include "fs/NarrowPath.hxx"
#include "input/InputStream.hxx"
#include "input/LocalOpen.hxx"
#include "util/StringView.hxx"
#include "util/PrintException.hxx"
#include <stdlib.h>
@@ -36,11 +35,12 @@
static bool
MyApeTagCallback([[maybe_unused]] unsigned long flags,
const char *key, StringView value)
const char *key, std::string_view value)
{
if ((flags & (0x3 << 1)) == 0)
// UTF-8
printf("\"%s\"=\"%.*s\"\n", key, (int)value.size, value.data);
printf("\"%s\"=\"%.*s\"\n", key,
(int)value.size(), value.data());
else
printf("\"%s\"=0x%lx\n", key, flags);
return true;

View File

@@ -1,6 +1,5 @@
#include "playlist/cue/CueParser.hxx"
#include "util/IterableSplitString.hxx"
#include "util/StringView.hxx"
extern "C" {
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);

View File

@@ -31,7 +31,6 @@
#include "pcm/AudioFormat.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringBuffer.hxx"
#include "util/StringView.hxx"
#include "util/PrintException.hxx"
#include <cassert>

View File

@@ -19,7 +19,6 @@
#include "tag/MixRampParser.cxx"
#include "tag/MixRampInfo.hxx"
#include "util/StringView.hxx"
#include <gtest/gtest.h>