diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index db3fd70f4..a41bb46eb 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -20,7 +20,7 @@ #include "FingerprintCommands.hxx" #include "OtherCommands.hxx" #include "Permission.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "Partition.hxx" #include "Instance.hxx" #include "client/Client.hxx" diff --git a/src/command/ClientCommands.cxx b/src/command/ClientCommands.cxx index 7e66f1244..6be2bd76a 100644 --- a/src/command/ClientCommands.cxx +++ b/src/command/ClientCommands.cxx @@ -8,7 +8,7 @@ #include "client/Response.hxx" #include "TagPrint.hxx" #include "tag/ParseName.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "util/StringAPI.hxx" CommandResult diff --git a/src/command/TagCommands.cxx b/src/command/TagCommands.cxx index 95c3b39ba..170904ff5 100644 --- a/src/command/TagCommands.cxx +++ b/src/command/TagCommands.cxx @@ -6,7 +6,7 @@ #include "client/Client.hxx" #include "client/Response.hxx" #include "tag/ParseName.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "queue/Playlist.hxx" #include diff --git a/src/db/Selection.hxx b/src/db/Selection.hxx index 8a1e64ce2..a8c8a58c5 100644 --- a/src/db/Selection.hxx +++ b/src/db/Selection.hxx @@ -5,7 +5,7 @@ #define MPD_DATABASE_SELECTION_HXX #include "protocol/RangeArg.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include diff --git a/src/decoder/plugins/OpenmptDecoderPlugin.cxx b/src/decoder/plugins/OpenmptDecoderPlugin.cxx index 36d4bc9e3..d14a3e477 100644 --- a/src/decoder/plugins/OpenmptDecoderPlugin.cxx +++ b/src/decoder/plugins/OpenmptDecoderPlugin.cxx @@ -7,7 +7,7 @@ #include "../DecoderAPI.hxx" #include "input/InputStream.hxx" #include "tag/Handler.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "util/Domain.hxx" #include "Log.hxx" diff --git a/src/queue/Selection.hxx b/src/queue/Selection.hxx index 53745576d..9a0a7fc15 100644 --- a/src/queue/Selection.hxx +++ b/src/queue/Selection.hxx @@ -4,7 +4,7 @@ #pragma once #include "protocol/RangeArg.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" struct Queue; class SongFilter; diff --git a/src/song/Filter.cxx b/src/song/Filter.cxx index 333dce683..fc6126814 100644 --- a/src/song/Filter.cxx +++ b/src/song/Filter.cxx @@ -12,7 +12,7 @@ #include "PrioritySongFilter.hxx" #include "pcm/AudioParser.hxx" #include "tag/ParseName.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "time/ISO8601.hxx" #include "lib/fmt/RuntimeError.hxx" #include "util/CharUtil.hxx" diff --git a/src/tag/Builder.hxx b/src/tag/Builder.hxx index 04ba1d96b..94dd7028b 100644 --- a/src/tag/Builder.hxx +++ b/src/tag/Builder.hxx @@ -4,7 +4,7 @@ #ifndef MPD_TAG_BUILDER_HXX #define MPD_TAG_BUILDER_HXX -#include "Type.h" +#include "Type.hxx" #include "Chrono.hxx" #include diff --git a/src/tag/Config.cxx b/src/tag/Config.cxx index 9d848f2a7..0b334adaa 100644 --- a/src/tag/Config.cxx +++ b/src/tag/Config.cxx @@ -4,7 +4,7 @@ #include "Config.hxx" #include "Settings.hxx" #include "ParseName.hxx" -#include "Type.h" +#include "Type.hxx" #include "config/Data.hxx" #include "config/Option.hxx" #include "lib/fmt/RuntimeError.hxx" diff --git a/src/tag/Fallback.hxx b/src/tag/Fallback.hxx index 2c8ed8962..483cfde38 100644 --- a/src/tag/Fallback.hxx +++ b/src/tag/Fallback.hxx @@ -4,7 +4,7 @@ #ifndef MPD_TAG_FALLBACK_HXX #define MPD_TAG_FALLBACK_HXX -#include "Type.h" +#include "Type.hxx" #include diff --git a/src/tag/GenParseName.cxx b/src/tag/GenParseName.cxx index fdaf90adf..980e14f37 100644 --- a/src/tag/GenParseName.cxx +++ b/src/tag/GenParseName.cxx @@ -31,7 +31,7 @@ main(int argc, char **argv) fprintf(out, "#include \"ParseName.hxx\"\n" - "#include \"Type.h\"\n" + "#include \"Type.hxx\"\n" "\n" "#include \n" "#include \n" diff --git a/src/tag/Id3MusicBrainz.cxx b/src/tag/Id3MusicBrainz.cxx index 57b1dc8bc..ec96449a5 100644 --- a/src/tag/Id3MusicBrainz.cxx +++ b/src/tag/Id3MusicBrainz.cxx @@ -3,7 +3,7 @@ #include "Id3MusicBrainz.hxx" #include "Table.hxx" -#include "Type.h" +#include "Type.hxx" const struct tag_table musicbrainz_txxx_tags[] = { { "ALBUMARTISTSORT", TAG_ALBUM_ARTIST_SORT }, diff --git a/src/tag/Names.hxx b/src/tag/Names.hxx index 8cc98d773..60bb3721b 100644 --- a/src/tag/Names.hxx +++ b/src/tag/Names.hxx @@ -3,7 +3,7 @@ #pragma once -#include "Type.h" +#include "Type.hxx" #include diff --git a/src/tag/ParseName.hxx b/src/tag/ParseName.hxx index 18e9001af..b165ac19e 100644 --- a/src/tag/ParseName.hxx +++ b/src/tag/ParseName.hxx @@ -5,6 +5,7 @@ #define MPD_TAG_PARSE_NAME_HXX #include + #include enum TagType : uint8_t; diff --git a/src/tag/Settings.cxx b/src/tag/Settings.cxx index 582722a44..4c3d6ebeb 100644 --- a/src/tag/Settings.cxx +++ b/src/tag/Settings.cxx @@ -2,6 +2,6 @@ // Copyright The Music Player Daemon Project #include "Settings.hxx" -#include "Type.h" +#include "Type.hxx" TagMask global_tag_mask = TagMask::All() & ~TagMask(TAG_COMMENT); diff --git a/src/tag/Table.hxx b/src/tag/Table.hxx index 65171392a..19e98314d 100644 --- a/src/tag/Table.hxx +++ b/src/tag/Table.hxx @@ -4,7 +4,7 @@ #ifndef MPD_TAG_TABLE_HXX #define MPD_TAG_TABLE_HXX -#include "Type.h" +#include "Type.hxx" #include diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx index 56f44b771..6d6c368af 100644 --- a/src/tag/Tag.hxx +++ b/src/tag/Tag.hxx @@ -4,7 +4,7 @@ #ifndef 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 "Chrono.hxx" #include "util/DereferenceIterator.hxx" diff --git a/src/tag/Type.h b/src/tag/Type.hxx similarity index 69% rename from src/tag/Type.h rename to src/tag/Type.hxx index 823a37c6e..9ec43d8bd 100644 --- a/src/tag/Type.h +++ b/src/tag/Type.hxx @@ -1,24 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later // Copyright The Music Player Daemon Project -#ifndef MPD_TAG_TYPE_H -#define MPD_TAG_TYPE_H +#pragma once -#ifdef __cplusplus #include -#endif /** * Codes for the type of a tag item. */ -enum TagType -#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 - { +enum TagType : uint8_t { TAG_ARTIST, TAG_ARTIST_SORT, TAG_ALBUM, @@ -56,5 +46,3 @@ enum TagType TAG_NUM_OF_ITEM_TYPES }; - -#endif diff --git a/test/TestTagSongFilter.cxx b/test/TestTagSongFilter.cxx index 358101e63..a7ea689f1 100644 --- a/test/TestTagSongFilter.cxx +++ b/test/TestTagSongFilter.cxx @@ -4,7 +4,7 @@ #include "MakeTag.hxx" #include "song/TagSongFilter.hxx" #include "song/LightSong.hxx" -#include "tag/Type.h" +#include "tag/Type.hxx" #include "lib/icu/Init.hxx" #include