From df9d869911cd7cd1d1c5d49d2f3fdebba5893915 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 16 Jun 2019 17:42:14 +0200 Subject: [PATCH] Fix const-corretness in Id3Genres::genreNames() --- id3/id3genres.cpp | 11 +++++------ id3/id3genres.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/id3/id3genres.cpp b/id3/id3genres.cpp index 24dda00..336267b 100644 --- a/id3/id3genres.cpp +++ b/id3/id3genres.cpp @@ -11,14 +11,13 @@ namespace TagParser { /*! * \brief Returns all known genre names. - * \todo Fix const-correctness in v9. */ -const char **Id3Genres::genreNames() +const char *const *Id3Genres::genreNames() { - static const char *names[] = { "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", - "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", - "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", - "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", + static const char *const names[] = { "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", + "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", + "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", + "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk-Rock", diff --git a/id3/id3genres.h b/id3/id3genres.h index 14a12dc..1672b90 100644 --- a/id3/id3genres.h +++ b/id3/id3genres.h @@ -18,7 +18,7 @@ public: static constexpr bool isIndexSupported(int index); private: - static const char **genreNames(); + static const char *const *genreNames(); }; /*!