From a4d6e9a615a2f6b92f54106c6ab879f0673c3c7e Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Wed, 29 Aug 2007 22:57:23 +0000 Subject: [PATCH] Fixing compiler warning about missing virtual destructor in class with virtual methods git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@706328 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- taglib/fileref.cpp | 6 +++++- taglib/fileref.h | 6 +++++- taglib/mpeg/id3v1/id3v1tag.cpp | 4 ++++ taglib/mpeg/id3v1/id3v1tag.h | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 2aaaa240..0b0a49a3 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -48,6 +48,10 @@ List FileRef::FileRefPrivate::fileTypeResolve // public members //////////////////////////////////////////////////////////////////////////////// +FileRef::FileTypeResolver::~FileTypeResolver() +{ +} + FileRef::FileRef() { d = new FileRefPrivate(0); @@ -171,7 +175,7 @@ File *FileRef::create(const char *fileName, bool readAudioProperties, return new FLAC::File(fileName, readAudioProperties, audioPropertiesStyle); if(s.substr(s.size() - 4, 4).upper() == ".MPC") return new MPC::File(fileName, readAudioProperties, audioPropertiesStyle); - } + } return 0; } diff --git a/taglib/fileref.h b/taglib/fileref.h index 60db1425..b4f1c46e 100644 --- a/taglib/fileref.h +++ b/taglib/fileref.h @@ -56,7 +56,7 @@ namespace TagLib { class TAGLIB_EXPORT FileRef { public: - + //! A class for pluggable file type resolution. /*! @@ -89,6 +89,10 @@ namespace TagLib { class FileTypeResolver { public: + /*! + * Destroys this FileTypeResolver instance. + */ + virtual ~FileTypeResolver(); /*! * This method must be overridden to provide an additional file type * resolver. If the resolver is able to determine the file type it should diff --git a/taglib/mpeg/id3v1/id3v1tag.cpp b/taglib/mpeg/id3v1/id3v1tag.cpp index f6fb501e..b336a484 100644 --- a/taglib/mpeg/id3v1/id3v1tag.cpp +++ b/taglib/mpeg/id3v1/id3v1tag.cpp @@ -53,6 +53,10 @@ const ID3v1::StringHandler *ID3v1::Tag::TagPrivate::stringHandler = new StringHa // StringHandler implementation //////////////////////////////////////////////////////////////////////////////// +ID3v1::StringHandler::~StringHandler() +{ +} + String ID3v1::StringHandler::parse(const ByteVector &data) const { return String(data, String::Latin1).stripWhiteSpace(); diff --git a/taglib/mpeg/id3v1/id3v1tag.h b/taglib/mpeg/id3v1/id3v1tag.h index 9046232a..baef325b 100644 --- a/taglib/mpeg/id3v1/id3v1tag.h +++ b/taglib/mpeg/id3v1/id3v1tag.h @@ -56,6 +56,10 @@ namespace TagLib { class StringHandler { public: + /*! + * Destroys this StringHandler instance. + */ + virtual ~StringHandler(); /*! * Decode a string from \a data. The default implementation assumes that * \a data is an ISO-8859-1 (Latin1) character array. -- 2.40.0