clang-tidy: default virtual destructors

Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-05-30 22:30:34 -07:00
parent 679b3bc00f
commit 9ef1cf15a9
9 changed files with 11 additions and 11 deletions

View File

@ -35,7 +35,7 @@ class Encoder {
public:
explicit Encoder(bool _implements_tag) noexcept
:implements_tag(_implements_tag) {}
virtual ~Encoder() noexcept {}
virtual ~Encoder() noexcept = default;
bool ImplementsTag() const noexcept {
return implements_tag;
@ -111,7 +111,7 @@ public:
class PreparedEncoder {
public:
virtual ~PreparedEncoder() noexcept {}
virtual ~PreparedEncoder() noexcept = default;
/**
* Opens the object. You must call this prior to using it.

View File

@ -36,7 +36,7 @@ protected:
}
public:
virtual ~Filter() noexcept {}
virtual ~Filter() noexcept = default;
/**
* Returns the #AudioFormat produced by FilterPCM().

View File

@ -27,7 +27,7 @@ class Filter;
class PreparedFilter {
public:
virtual ~PreparedFilter() {}
virtual ~PreparedFilter() = default;
/**
* Opens the filter, preparing it for FilterPCM().

View File

@ -57,7 +57,7 @@ public:
Mixer(const Mixer &) = delete;
virtual ~Mixer() {}
virtual ~Mixer() = default;
bool IsPlugin(const MixerPlugin &other) const noexcept {
return &plugin == &other;

View File

@ -49,7 +49,7 @@ public:
/**
* Free instance data.
*/
virtual ~NeighborExplorer() noexcept {}
virtual ~NeighborExplorer() noexcept = default;
/**
* Start exploring the neighborhood.

View File

@ -31,7 +31,7 @@ struct AudioFormat;
*/
class PcmResampler {
public:
virtual ~PcmResampler() {}
virtual ~PcmResampler() = default;
/**
* Opens the resampler, preparing it for Resample().

View File

@ -30,7 +30,7 @@ class DetachedSong;
*/
class SongEnumerator {
public:
virtual ~SongEnumerator() noexcept {}
virtual ~SongEnumerator() noexcept = default;
/**
* Obtain the next song. Returns nullptr if there are no more

View File

@ -31,7 +31,7 @@ using ISongFilterPtr = std::unique_ptr<ISongFilter>;
class ISongFilter {
public:
virtual ~ISongFilter() noexcept {}
virtual ~ISongFilter() noexcept = default;
virtual ISongFilterPtr Clone() const noexcept = 0;

View File

@ -33,7 +33,7 @@ class StorageDirectoryReader {
public:
StorageDirectoryReader() = default;
StorageDirectoryReader(const StorageDirectoryReader &) = delete;
virtual ~StorageDirectoryReader() noexcept {}
virtual ~StorageDirectoryReader() noexcept = default;
virtual const char *Read() noexcept = 0;
@ -47,7 +47,7 @@ class Storage {
public:
Storage() = default;
Storage(const Storage &) = delete;
virtual ~Storage() noexcept {}
virtual ~Storage() noexcept = default;
/**
* Throws #std::runtime_error on error.