Remove virtual destructors from POD toolkit types

This one's been haunting me for a couple decades.  "Make all the things
virtual!" was kind of a strategy I had for forward compatibility when I
wrote this code when I was 20 or so and didn't know better.
This commit is contained in:
Scott Wheeler 2023-07-30 02:47:00 +02:00
parent 9bcba812af
commit a1bdb0171d
10 changed files with 10 additions and 10 deletions

View File

@ -299,7 +299,7 @@ public:
file(nullptr),
stream(nullptr) {}
~FileRefPrivate() override {
~FileRefPrivate() {
delete file;
delete stream;
}

View File

@ -95,7 +95,7 @@ namespace TagLib {
/*!
* Destroys this ByteVector instance.
*/
virtual ~ByteVector();
~ByteVector();
/*!
* Sets the data for the byte array using the first \a length bytes of \a data

View File

@ -50,7 +50,7 @@ namespace TagLib {
/*!
* Destroys this ByteVectorList instance.
*/
~ByteVectorList() override;
~ByteVectorList();
/*!
* Make a shallow, implicitly shared, copy of \a l. Because this is

View File

@ -74,7 +74,7 @@ namespace TagLib {
* Destroys this List instance. If auto deletion is enabled and this list
* contains a pointer type all of the members are also deleted.
*/
virtual ~List();
~List();
/*!
* Returns an STL style iterator to the beginning of the list. See

View File

@ -69,7 +69,7 @@ template <class TP> class List<T>::ListPrivate<TP *> : public ListPrivateBase
public:
ListPrivate() : ListPrivateBase() {}
ListPrivate(const std::list<TP *> &l) : ListPrivateBase(), list(l) {}
~ListPrivate() override {
~ListPrivate() {
clear();
}
void clear() {

View File

@ -76,7 +76,7 @@ namespace TagLib {
/*!
* Destroys this instance of the Map.
*/
virtual ~Map();
~Map();
/*!
* Returns an STL style iterator to the beginning of the map. See

View File

@ -133,7 +133,7 @@ namespace TagLib {
*/
PropertyMap(const SimplePropertyMap &m);
~PropertyMap() override;
~PropertyMap();
/*!
* Inserts \a values under \a key in the map. If \a key already exists,

View File

@ -43,7 +43,7 @@ namespace TagLib
{
public:
RefCounter();
virtual ~RefCounter();
~RefCounter();
void ref();
bool deref();

View File

@ -185,7 +185,7 @@ namespace TagLib {
/*!
* Destroys this String instance.
*/
virtual ~String();
~String();
/*!
* Returns a deep copy of this String as an std::string. The returned string

View File

@ -74,7 +74,7 @@ namespace TagLib {
/*!
* Destroys this StringList instance.
*/
~StringList() override;
~StringList();
/*!
* Concatenate the list of strings into one string separated by \a separator.