TagPrint: use std::string_view
This commit is contained in:
parent
ed7263ee3e
commit
96f99aeb8f
@ -21,7 +21,6 @@
|
|||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "tag/Settings.hxx"
|
#include "tag/Settings.hxx"
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "util/StringView.hxx"
|
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ tag_print_types(Response &r) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Response &r, TagType type, StringView value) noexcept
|
tag_print(Response &r, TagType type, std::string_view value) noexcept
|
||||||
{
|
{
|
||||||
r.Fmt(FMT_STRING("{}: {}\n"), tag_item_names[type], value);
|
r.Fmt(FMT_STRING("{}: {}\n"), tag_item_names[type], value);
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,18 @@
|
|||||||
#define MPD_TAG_PRINT_HXX
|
#define MPD_TAG_PRINT_HXX
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
enum TagType : uint8_t;
|
enum TagType : uint8_t;
|
||||||
|
|
||||||
struct Tag;
|
struct Tag;
|
||||||
struct StringView;
|
|
||||||
class Response;
|
class Response;
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print_types(Response &response) noexcept;
|
tag_print_types(Response &response) noexcept;
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Response &response, TagType type, StringView value) noexcept;
|
tag_print(Response &response, TagType type, std::string_view value) noexcept;
|
||||||
|
|
||||||
void
|
void
|
||||||
tag_print(Response &response, TagType type, const char *value) noexcept;
|
tag_print(Response &response, TagType type, const char *value) noexcept;
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
struct StringView;
|
|
||||||
struct Directory;
|
struct Directory;
|
||||||
class ExportedSong;
|
class ExportedSong;
|
||||||
class DetachedSong;
|
class DetachedSong;
|
||||||
|
Loading…
Reference in New Issue
Block a user