tag/Type: require C++

This commit is contained in:
Max Kellermann 2023-03-06 15:17:41 +01:00
parent 118b76a8f1
commit 7a46c57ef3
19 changed files with 20 additions and 31 deletions

View File

@ -20,7 +20,7 @@
#include "FingerprintCommands.hxx" #include "FingerprintCommands.hxx"
#include "OtherCommands.hxx" #include "OtherCommands.hxx"
#include "Permission.hxx" #include "Permission.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "Partition.hxx" #include "Partition.hxx"
#include "Instance.hxx" #include "Instance.hxx"
#include "client/Client.hxx" #include "client/Client.hxx"

View File

@ -8,7 +8,7 @@
#include "client/Response.hxx" #include "client/Response.hxx"
#include "TagPrint.hxx" #include "TagPrint.hxx"
#include "tag/ParseName.hxx" #include "tag/ParseName.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "util/StringAPI.hxx" #include "util/StringAPI.hxx"
CommandResult CommandResult

View File

@ -6,7 +6,7 @@
#include "client/Client.hxx" #include "client/Client.hxx"
#include "client/Response.hxx" #include "client/Response.hxx"
#include "tag/ParseName.hxx" #include "tag/ParseName.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "queue/Playlist.hxx" #include "queue/Playlist.hxx"
#include <fmt/format.h> #include <fmt/format.h>

View File

@ -5,7 +5,7 @@
#define MPD_DATABASE_SELECTION_HXX #define MPD_DATABASE_SELECTION_HXX
#include "protocol/RangeArg.hxx" #include "protocol/RangeArg.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include <string> #include <string>

View File

@ -7,7 +7,7 @@
#include "../DecoderAPI.hxx" #include "../DecoderAPI.hxx"
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "tag/Handler.hxx" #include "tag/Handler.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "Log.hxx" #include "Log.hxx"

View File

@ -4,7 +4,7 @@
#pragma once #pragma once
#include "protocol/RangeArg.hxx" #include "protocol/RangeArg.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
struct Queue; struct Queue;
class SongFilter; class SongFilter;

View File

@ -12,7 +12,7 @@
#include "PrioritySongFilter.hxx" #include "PrioritySongFilter.hxx"
#include "pcm/AudioParser.hxx" #include "pcm/AudioParser.hxx"
#include "tag/ParseName.hxx" #include "tag/ParseName.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "time/ISO8601.hxx" #include "time/ISO8601.hxx"
#include "lib/fmt/RuntimeError.hxx" #include "lib/fmt/RuntimeError.hxx"
#include "util/CharUtil.hxx" #include "util/CharUtil.hxx"

View File

@ -4,7 +4,7 @@
#ifndef MPD_TAG_BUILDER_HXX #ifndef MPD_TAG_BUILDER_HXX
#define MPD_TAG_BUILDER_HXX #define MPD_TAG_BUILDER_HXX
#include "Type.h" #include "Type.hxx"
#include "Chrono.hxx" #include "Chrono.hxx"
#include <memory> #include <memory>

View File

@ -4,7 +4,7 @@
#include "Config.hxx" #include "Config.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "ParseName.hxx" #include "ParseName.hxx"
#include "Type.h" #include "Type.hxx"
#include "config/Data.hxx" #include "config/Data.hxx"
#include "config/Option.hxx" #include "config/Option.hxx"
#include "lib/fmt/RuntimeError.hxx" #include "lib/fmt/RuntimeError.hxx"

View File

@ -4,7 +4,7 @@
#ifndef MPD_TAG_FALLBACK_HXX #ifndef MPD_TAG_FALLBACK_HXX
#define MPD_TAG_FALLBACK_HXX #define MPD_TAG_FALLBACK_HXX
#include "Type.h" #include "Type.hxx"
#include <utility> #include <utility>

View File

@ -31,7 +31,7 @@ main(int argc, char **argv)
fprintf(out, fprintf(out,
"#include \"ParseName.hxx\"\n" "#include \"ParseName.hxx\"\n"
"#include \"Type.h\"\n" "#include \"Type.hxx\"\n"
"\n" "\n"
"#include <assert.h>\n" "#include <assert.h>\n"
"#include <string.h>\n" "#include <string.h>\n"

View File

@ -3,7 +3,7 @@
#include "Id3MusicBrainz.hxx" #include "Id3MusicBrainz.hxx"
#include "Table.hxx" #include "Table.hxx"
#include "Type.h" #include "Type.hxx"
const struct tag_table musicbrainz_txxx_tags[] = { const struct tag_table musicbrainz_txxx_tags[] = {
{ "ALBUMARTISTSORT", TAG_ALBUM_ARTIST_SORT }, { "ALBUMARTISTSORT", TAG_ALBUM_ARTIST_SORT },

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "Type.h" #include "Type.hxx"
#include <array> #include <array>

View File

@ -5,6 +5,7 @@
#define MPD_TAG_PARSE_NAME_HXX #define MPD_TAG_PARSE_NAME_HXX
#include <cstdint> #include <cstdint>
#include <string_view> #include <string_view>
enum TagType : uint8_t; enum TagType : uint8_t;

View File

@ -2,6 +2,6 @@
// Copyright The Music Player Daemon Project // Copyright The Music Player Daemon Project
#include "Settings.hxx" #include "Settings.hxx"
#include "Type.h" #include "Type.hxx"
TagMask global_tag_mask = TagMask::All() & ~TagMask(TAG_COMMENT); TagMask global_tag_mask = TagMask::All() & ~TagMask(TAG_COMMENT);

View File

@ -4,7 +4,7 @@
#ifndef MPD_TAG_TABLE_HXX #ifndef MPD_TAG_TABLE_HXX
#define MPD_TAG_TABLE_HXX #define MPD_TAG_TABLE_HXX
#include "Type.h" #include "Type.hxx"
#include <string_view> #include <string_view>

View File

@ -4,7 +4,7 @@
#ifndef MPD_TAG_HXX #ifndef MPD_TAG_HXX
#define MPD_TAG_HXX #define MPD_TAG_HXX
#include "Type.h" // IWYU pragma: export #include "Type.hxx" // IWYU pragma: export
#include "Item.hxx" // IWYU pragma: export #include "Item.hxx" // IWYU pragma: export
#include "Chrono.hxx" #include "Chrono.hxx"
#include "util/DereferenceIterator.hxx" #include "util/DereferenceIterator.hxx"

View File

@ -1,24 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project // Copyright The Music Player Daemon Project
#ifndef MPD_TAG_TYPE_H #pragma once
#define MPD_TAG_TYPE_H
#ifdef __cplusplus
#include <cstdint> #include <cstdint>
#endif
/** /**
* Codes for the type of a tag item. * Codes for the type of a tag item.
*/ */
enum TagType enum TagType : uint8_t {
#ifdef __cplusplus
/* the size of this enum is 1 byte; this is only relevant for C++
code; the only C sources including this header don't use instances
of this enum, they only refer to the integer values */
: uint8_t
#endif
{
TAG_ARTIST, TAG_ARTIST,
TAG_ARTIST_SORT, TAG_ARTIST_SORT,
TAG_ALBUM, TAG_ALBUM,
@ -56,5 +46,3 @@ enum TagType
TAG_NUM_OF_ITEM_TYPES TAG_NUM_OF_ITEM_TYPES
}; };
#endif

View File

@ -4,7 +4,7 @@
#include "MakeTag.hxx" #include "MakeTag.hxx"
#include "song/TagSongFilter.hxx" #include "song/TagSongFilter.hxx"
#include "song/LightSong.hxx" #include "song/LightSong.hxx"
#include "tag/Type.h" #include "tag/Type.hxx"
#include "lib/icu/Init.hxx" #include "lib/icu/Init.hxx"
#include <gtest/gtest.h> #include <gtest/gtest.h>