mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
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:
parent
9bcba812af
commit
a1bdb0171d
@ -299,7 +299,7 @@ public:
|
||||
file(nullptr),
|
||||
stream(nullptr) {}
|
||||
|
||||
~FileRefPrivate() override {
|
||||
~FileRefPrivate() {
|
||||
delete file;
|
||||
delete stream;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -43,7 +43,7 @@ namespace TagLib
|
||||
{
|
||||
public:
|
||||
RefCounter();
|
||||
virtual ~RefCounter();
|
||||
~RefCounter();
|
||||
|
||||
void ref();
|
||||
bool deref();
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user