Return tag union for tag() of WAV file

This commit is contained in:
Urs Fleisch 2023-11-24 07:49:14 +01:00
parent 8bb8fc5fe6
commit 56382e8cd4
3 changed files with 6 additions and 8 deletions

View File

@ -93,9 +93,9 @@ RIFF::WAV::File::File(IOStream *stream, bool readProperties, Properties::ReadSty
RIFF::WAV::File::~File() = default;
ID3v2::Tag *RIFF::WAV::File::tag() const
TagLib::Tag *RIFF::WAV::File::tag() const
{
return ID3v2Tag();
return &d->tag;
}
ID3v2::Tag *RIFF::WAV::File::ID3v2Tag() const

View File

@ -107,12 +107,10 @@ namespace TagLib {
File &operator=(const File &) = delete;
/*!
* Returns the ID3v2 Tag for this file.
*
* \note This method does not return all the tags for this file for
* backward compatibility. Will be fixed in TagLib 2.0.
* Returns the tag for this file. This will be an RIFF INFO tag, an
* ID3v2 tag or a combination of the two.
*/
ID3v2::Tag *tag() const override;
TagLib::Tag *tag() const override;
/*!
* Returns the ID3v2 Tag for this file.

View File

@ -290,7 +290,7 @@ public:
return static_cast<const RIFF::WAV::File &>(f).hasID3v2Tag();
},
[](File &f) {
return static_cast<RIFF::WAV::File &>(f).tag();
return static_cast<RIFF::WAV::File &>(f).ID3v2Tag();
},
[](File &f) {
static_cast<RIFF::WAV::File &>(f).strip();