diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx index ce86fe607..79c0bf138 100644 --- a/src/archive/plugins/Bzip2ArchivePlugin.cxx +++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx @@ -47,7 +47,7 @@ public: name.erase(len - 4); } - virtual void Visit(ArchiveVisitor &visitor) override { + void Visit(ArchiveVisitor &visitor) override { visitor.VisitArchiveEntry(name.c_str()); } @@ -68,7 +68,7 @@ public: Bzip2InputStream(const std::shared_ptr &_input, const char *uri, Mutex &mutex); - ~Bzip2InputStream(); + ~Bzip2InputStream() override; /* virtual methods from InputStream */ bool IsEOF() const noexcept override; diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index e95c5de38..2a63b2505 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -71,7 +71,7 @@ public: void Visit(char *path, size_t length, size_t capacity, ArchiveVisitor &visitor); - virtual void Visit(ArchiveVisitor &visitor) override; + void Visit(ArchiveVisitor &visitor) override; InputStreamPtr OpenStream(const char *path, Mutex &mutex) override; @@ -152,7 +152,7 @@ public: SetReady(); } - ~Iso9660InputStream() { + ~Iso9660InputStream() override { free(statbuf); } diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx index 8a526805c..7b60ab36f 100644 --- a/src/archive/plugins/ZzipArchivePlugin.cxx +++ b/src/archive/plugins/ZzipArchivePlugin.cxx @@ -57,7 +57,7 @@ public: ZzipArchiveFile(std::shared_ptr &&_dir) :dir(std::move(_dir)) {} - virtual void Visit(ArchiveVisitor &visitor) override; + void Visit(ArchiveVisitor &visitor) override; InputStreamPtr OpenStream(const char *path, Mutex &mutex) override; @@ -106,7 +106,7 @@ public: SetReady(); } - ~ZzipInputStream() { + ~ZzipInputStream() override { zzip_file_close(file); } diff --git a/src/db/update/Archive.cxx b/src/db/update/Archive.cxx index 5b88f39bc..5e03e0c7e 100644 --- a/src/db/update/Archive.cxx +++ b/src/db/update/Archive.cxx @@ -107,7 +107,7 @@ class UpdateArchiveVisitor final : public ArchiveVisitor { Directory &_directory) noexcept :walk(_walk), archive(_archive), directory(_directory) {} - virtual void VisitArchiveEntry(const char *path_utf8) override { + void VisitArchiveEntry(const char *path_utf8) override { FormatDebug(update_domain, "adding archive file: %s", path_utf8); walk.UpdateArchiveTree(archive, directory, path_utf8); diff --git a/src/event/FullyBufferedSocket.hxx b/src/event/FullyBufferedSocket.hxx index 6d25e08dc..6a33ab155 100644 --- a/src/event/FullyBufferedSocket.hxx +++ b/src/event/FullyBufferedSocket.hxx @@ -69,7 +69,7 @@ protected: /* virtual methods from class SocketMonitor */ bool OnSocketReady(unsigned flags) noexcept override; - virtual void OnIdle() noexcept override; + void OnIdle() noexcept override; }; #endif diff --git a/src/filter/NullFilter.hxx b/src/filter/NullFilter.hxx index ad4579e58..01cb7b012 100644 --- a/src/filter/NullFilter.hxx +++ b/src/filter/NullFilter.hxx @@ -27,7 +27,7 @@ class NullFilter final : public Filter { public: explicit NullFilter(const AudioFormat &af):Filter(af) {} - virtual ConstBuffer FilterPCM(ConstBuffer src) override { + ConstBuffer FilterPCM(ConstBuffer src) override { return src; } }; diff --git a/src/filter/Observer.cxx b/src/filter/Observer.cxx index 53282ef3e..364c7b958 100644 --- a/src/filter/Observer.cxx +++ b/src/filter/Observer.cxx @@ -36,7 +36,7 @@ public: :observer(_observer), prepared_filter(std::move(_prepared_filter)) {} - ~PreparedProxy() noexcept { + ~PreparedProxy() noexcept override { assert(child == nullptr); assert(observer.proxy == this); @@ -63,7 +63,7 @@ public: :Filter(_filter->GetOutAudioFormat()), parent(_parent), filter(std::move(_filter)) {} - ~Proxy() noexcept { + ~Proxy() noexcept override { parent.Clear(this); } diff --git a/src/filter/plugins/NormalizeFilterPlugin.cxx b/src/filter/plugins/NormalizeFilterPlugin.cxx index 729eaa9bd..bd315c91b 100644 --- a/src/filter/plugins/NormalizeFilterPlugin.cxx +++ b/src/filter/plugins/NormalizeFilterPlugin.cxx @@ -38,7 +38,7 @@ public: :Filter(audio_format), compressor(Compressor_new(0)) { } - ~NormalizeFilter() { + ~NormalizeFilter() override { Compressor_delete(compressor); } diff --git a/src/filter/plugins/NullFilterPlugin.cxx b/src/filter/plugins/NullFilterPlugin.cxx index c3cb646b3..115124179 100644 --- a/src/filter/plugins/NullFilterPlugin.cxx +++ b/src/filter/plugins/NullFilterPlugin.cxx @@ -32,7 +32,7 @@ class PreparedNullFilter final : public PreparedFilter { public: - virtual std::unique_ptr Open(AudioFormat &af) override { + std::unique_ptr Open(AudioFormat &af) override { return std::make_unique(af); } }; diff --git a/src/fs/io/AutoGunzipReader.hxx b/src/fs/io/AutoGunzipReader.hxx index 91d68bde8..6a9613b90 100644 --- a/src/fs/io/AutoGunzipReader.hxx +++ b/src/fs/io/AutoGunzipReader.hxx @@ -40,7 +40,7 @@ public: ~AutoGunzipReader() noexcept; /* virtual methods from class Reader */ - virtual size_t Read(void *data, size_t size) override; + size_t Read(void *data, size_t size) override; private: void Detect(); diff --git a/src/fs/io/PeekReader.hxx b/src/fs/io/PeekReader.hxx index 5c1d1bc22..e0b355a89 100644 --- a/src/fs/io/PeekReader.hxx +++ b/src/fs/io/PeekReader.hxx @@ -43,7 +43,7 @@ public: const void *Peek(size_t size); /* virtual methods from class Reader */ - virtual size_t Read(void *data, size_t size) override; + size_t Read(void *data, size_t size) override; }; #endif diff --git a/src/input/AsyncInputStream.hxx b/src/input/AsyncInputStream.hxx index a5e5bb7e6..0c822dd8d 100644 --- a/src/input/AsyncInputStream.hxx +++ b/src/input/AsyncInputStream.hxx @@ -74,7 +74,7 @@ public: size_t _buffer_size, size_t _resume_at) noexcept; - virtual ~AsyncInputStream() noexcept; + ~AsyncInputStream() noexcept override; auto &GetEventLoop() const noexcept { return deferred_resume.GetEventLoop(); diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx index 9ce539f18..98ebd4d92 100644 --- a/src/input/plugins/AlsaInputPlugin.cxx +++ b/src/input/plugins/AlsaInputPlugin.cxx @@ -89,7 +89,7 @@ public: Mutex &_mutex, const SourceSpec &spec); - ~AlsaInputStream() { + ~AlsaInputStream() override { BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){ MultiSocketMonitor::Reset(); defer_invalidate_sockets.Cancel(); @@ -103,13 +103,13 @@ public: protected: /* virtual methods from AsyncInputStream */ - virtual void DoResume() override { + void DoResume() override { snd_pcm_resume(capture_handle); InvalidateSockets(); } - virtual void DoSeek(gcc_unused offset_type new_offset) override { + void DoSeek(gcc_unused offset_type new_offset) override { /* unreachable because seekable==false */ SeekDone(); } diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx index 8e3bb0d53..00bd8c84a 100644 --- a/src/input/plugins/CdioParanoiaInputPlugin.cxx +++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx @@ -81,7 +81,7 @@ class CdioParanoiaInputStream final : public InputStream { SetReady(); } - ~CdioParanoiaInputStream() { + ~CdioParanoiaInputStream() override { para = {}; cdio_cddap_close_no_free_cdio(drv); cdio_destroy(cdio); diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index 50416e660..0432e3ee5 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -85,7 +85,7 @@ public: I &&_icy, Mutex &_mutex); - ~CurlInputStream() noexcept; + ~CurlInputStream() noexcept override; CurlInputStream(const CurlInputStream &) = delete; CurlInputStream &operator=(const CurlInputStream &) = delete; @@ -137,8 +137,8 @@ private: void OnError(std::exception_ptr e) noexcept override; /* virtual methods from AsyncInputStream */ - virtual void DoResume() override; - virtual void DoSeek(offset_type new_offset) override; + void DoResume() override; + void DoSeek(offset_type new_offset) override; }; /** libcurl should accept "ICY 200 OK" */ diff --git a/src/input/plugins/MmsInputPlugin.cxx b/src/input/plugins/MmsInputPlugin.cxx index 75901dc47..00210ca4f 100644 --- a/src/input/plugins/MmsInputPlugin.cxx +++ b/src/input/plugins/MmsInputPlugin.cxx @@ -42,8 +42,8 @@ public: } protected: - virtual void Open() override; - virtual size_t ThreadRead(void *ptr, size_t size) override; + void Open() override; + size_t ThreadRead(void *ptr, size_t size) override; void Close() noexcept override { mmsx_close(mms); diff --git a/src/input/plugins/NfsInputPlugin.cxx b/src/input/plugins/NfsInputPlugin.cxx index 236d113a6..ec6011920 100644 --- a/src/input/plugins/NfsInputPlugin.cxx +++ b/src/input/plugins/NfsInputPlugin.cxx @@ -47,7 +47,7 @@ public: NFS_MAX_BUFFERED, NFS_RESUME_AT) {} - virtual ~NfsInputStream() { + ~NfsInputStream() override { DeferClose(); } @@ -62,8 +62,8 @@ private: protected: /* virtual methods from AsyncInputStream */ - virtual void DoResume() override; - virtual void DoSeek(offset_type new_offset) override; + void DoResume() override; + void DoSeek(offset_type new_offset) override; private: /* virtual methods from NfsFileReader */ diff --git a/src/input/plugins/QobuzInputPlugin.cxx b/src/input/plugins/QobuzInputPlugin.cxx index 6f402004f..85b31a1c0 100644 --- a/src/input/plugins/QobuzInputPlugin.cxx +++ b/src/input/plugins/QobuzInputPlugin.cxx @@ -53,7 +53,7 @@ public: qobuz_client->AddLoginHandler(*this); } - ~QobuzInputStream() { + ~QobuzInputStream() override { qobuz_client->RemoveLoginHandler(*this); } diff --git a/src/input/plugins/SmbclientInputPlugin.cxx b/src/input/plugins/SmbclientInputPlugin.cxx index 643537f88..e62ae3c65 100644 --- a/src/input/plugins/SmbclientInputPlugin.cxx +++ b/src/input/plugins/SmbclientInputPlugin.cxx @@ -43,7 +43,7 @@ public: SetReady(); } - ~SmbclientInputStream() { + ~SmbclientInputStream() override { const std::lock_guard lock(smbclient_mutex); smbc_close(fd); smbc_free_context(ctx, 1); diff --git a/src/input/plugins/TidalInputPlugin.cxx b/src/input/plugins/TidalInputPlugin.cxx index 84a0d413f..6df562047 100644 --- a/src/input/plugins/TidalInputPlugin.cxx +++ b/src/input/plugins/TidalInputPlugin.cxx @@ -65,7 +65,7 @@ public: tidal_session->AddLoginHandler(*this); } - ~TidalInputStream() { + ~TidalInputStream() override { tidal_session->RemoveLoginHandler(*this); } diff --git a/src/lib/upnp/Device.cxx b/src/lib/upnp/Device.cxx index a8633371e..23827f025 100644 --- a/src/lib/upnp/Device.cxx +++ b/src/lib/upnp/Device.cxx @@ -45,7 +45,7 @@ public: value(nullptr) {} protected: - virtual void StartElement(const XML_Char *name, const XML_Char **) { + void StartElement(const XML_Char *name, const XML_Char **) override { value = nullptr; switch (name[0]) { @@ -80,7 +80,7 @@ protected: } } - virtual void EndElement(const XML_Char *name) { + void EndElement(const XML_Char *name) override { if (value != nullptr) { trimstring(*value); value = nullptr; @@ -90,7 +90,7 @@ protected: } } - virtual void CharacterData(const XML_Char *s, int len) { + void CharacterData(const XML_Char *s, int len) override { if (value != nullptr) value->append(s, len); } diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx index 5e58571e0..827035364 100644 --- a/src/mixer/plugins/AlsaMixerPlugin.cxx +++ b/src/mixer/plugins/AlsaMixerPlugin.cxx @@ -86,7 +86,7 @@ public: :Mixer(alsa_mixer_plugin, _listener), event_loop(_event_loop) {} - virtual ~AlsaMixer(); + ~AlsaMixer() override; void Configure(const ConfigBlock &block); void Setup(); diff --git a/src/mixer/plugins/HaikuMixerPlugin.cxx b/src/mixer/plugins/HaikuMixerPlugin.cxx index 5f9f5e233..af5529f9a 100644 --- a/src/mixer/plugins/HaikuMixerPlugin.cxx +++ b/src/mixer/plugins/HaikuMixerPlugin.cxx @@ -36,14 +36,14 @@ public: self(_output) {} /* virtual methods from class Mixer */ - virtual void Open() override { + void Open() override { } void Close() noexcept override { } - virtual int GetVolume() override; - virtual void SetVolume(unsigned volume) override; + int GetVolume() override; + void SetVolume(unsigned volume) override; }; static Mixer * diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index 5e2d47af0..8bb5571d5 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -54,7 +54,7 @@ public: { } - virtual ~PulseMixer(); + ~PulseMixer() override; void Offline(); void VolumeCallback(const pa_sink_input_info *i, int eol); diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index d199632d5..504090a88 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -210,7 +210,7 @@ class AlsaOutput final public: AlsaOutput(EventLoop &loop, const ConfigBlock &block); - ~AlsaOutput() noexcept { + ~AlsaOutput() noexcept override { /* free libasound's config cache */ snd_config_update_free_global(); } diff --git a/src/output/plugins/AoOutputPlugin.cxx b/src/output/plugins/AoOutputPlugin.cxx index b5216a3f3..187c164b6 100644 --- a/src/output/plugins/AoOutputPlugin.cxx +++ b/src/output/plugins/AoOutputPlugin.cxx @@ -53,7 +53,7 @@ class AoOutput final : AudioOutput, SafeSingleton { size_t frame_size; AoOutput(const ConfigBlock &block); - ~AoOutput(); + ~AoOutput() override; public: static AudioOutput *Create(EventLoop &, const ConfigBlock &block) { diff --git a/src/output/plugins/FifoOutputPlugin.cxx b/src/output/plugins/FifoOutputPlugin.cxx index 8b6934f7f..8e49d7216 100644 --- a/src/output/plugins/FifoOutputPlugin.cxx +++ b/src/output/plugins/FifoOutputPlugin.cxx @@ -44,7 +44,7 @@ class FifoOutput final : AudioOutput { public: FifoOutput(const ConfigBlock &block); - ~FifoOutput() { + ~FifoOutput() override { CloseFifo(); } diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 222789209..7f7a49b5e 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -49,7 +49,7 @@ struct ShoutOutput final : AudioOutput { uint8_t buffer[32768]; explicit ShoutOutput(const ConfigBlock &block); - ~ShoutOutput(); + ~ShoutOutput() override; static AudioOutput *Create(EventLoop &event_loop, const ConfigBlock &block); diff --git a/src/playlist/MemorySongEnumerator.hxx b/src/playlist/MemorySongEnumerator.hxx index 5584532cd..c9dc0a20e 100644 --- a/src/playlist/MemorySongEnumerator.hxx +++ b/src/playlist/MemorySongEnumerator.hxx @@ -32,7 +32,7 @@ public: MemorySongEnumerator(std::forward_list &&_songs) :songs(std::move(_songs)) {} - virtual std::unique_ptr NextSong() override; + std::unique_ptr NextSong() override; }; #endif diff --git a/src/playlist/plugins/CuePlaylistPlugin.cxx b/src/playlist/plugins/CuePlaylistPlugin.cxx index 830329002..3740b231b 100644 --- a/src/playlist/plugins/CuePlaylistPlugin.cxx +++ b/src/playlist/plugins/CuePlaylistPlugin.cxx @@ -32,7 +32,7 @@ class CuePlaylist final : public SongEnumerator { :tis(std::move(is)) { } - virtual std::unique_ptr NextSong() override; + std::unique_ptr NextSong() override; }; static std::unique_ptr diff --git a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx index f1ffd0853..447d01852 100644 --- a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx +++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx @@ -55,7 +55,7 @@ public: return nullptr; } - virtual std::unique_ptr NextSong() override; + std::unique_ptr NextSong() override; }; static std::unique_ptr diff --git a/src/playlist/plugins/M3uPlaylistPlugin.cxx b/src/playlist/plugins/M3uPlaylistPlugin.cxx index d7b93fafe..a5d5c77e1 100644 --- a/src/playlist/plugins/M3uPlaylistPlugin.cxx +++ b/src/playlist/plugins/M3uPlaylistPlugin.cxx @@ -32,7 +32,7 @@ public: :tis(std::move(is)) { } - virtual std::unique_ptr NextSong() override; + std::unique_ptr NextSong() override; }; static std::unique_ptr diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index a75af7c66..bf482a6ec 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -80,7 +80,7 @@ public: nfs_init(_loop); } - ~NfsStorage() { + ~NfsStorage() override { BlockingCall(GetEventLoop(), [this](){ Disconnect(); }); nfs_finish(); } diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx index 2c64da59d..4b47c6af6 100644 --- a/src/storage/plugins/SmbclientStorage.cxx +++ b/src/storage/plugins/SmbclientStorage.cxx @@ -42,7 +42,7 @@ public: SmbclientDirectoryReader(std::string &&_base, unsigned _handle) :base(std::move(_base)), handle(_handle) {} - virtual ~SmbclientDirectoryReader(); + ~SmbclientDirectoryReader() override; /* virtual methods from class StorageDirectoryReader */ const char *Read() noexcept override; @@ -58,7 +58,7 @@ public: SmbclientStorage(const char *_base, SMBCCTX *_ctx) :base(_base), ctx(_ctx) {} - virtual ~SmbclientStorage() { + ~SmbclientStorage() override { const std::lock_guard lock(smbclient_mutex); smbc_free_context(ctx, 1); } diff --git a/src/zeroconf/AvahiPoll.cxx b/src/zeroconf/AvahiPoll.cxx index 835b4f988..3c1111e49 100644 --- a/src/zeroconf/AvahiPoll.cxx +++ b/src/zeroconf/AvahiPoll.cxx @@ -71,7 +71,7 @@ public: private: /* virtual methods from class SocketMonitor */ - bool OnSocketReady(unsigned flags) noexcept { + bool OnSocketReady(unsigned flags) noexcept override { received = ToAvahiWatchEvent(flags); callback(this, GetSocket().Get(), received, userdata); received = AvahiWatchEvent(0); diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index c601d7258..82a83eac6 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -68,11 +68,11 @@ InputStream::LockRead(void *, size_t) class MyDatabaseListener final : public DatabaseListener { public: - virtual void OnDatabaseModified() noexcept override { + void OnDatabaseModified() noexcept override { cout << "DatabaseModified" << endl; } - virtual void OnDatabaseSongRemoved(const char *uri) noexcept override { + void OnDatabaseSongRemoved(const char *uri) noexcept override { cout << "SongRemoved " << uri << endl; } }; diff --git a/test/run_neighbor_explorer.cxx b/test/run_neighbor_explorer.cxx index c6242dad6..e10782a8d 100644 --- a/test/run_neighbor_explorer.cxx +++ b/test/run_neighbor_explorer.cxx @@ -32,12 +32,12 @@ class MyNeighborListener final : public NeighborListener { public: /* virtual methods from class NeighborListener */ - virtual void FoundNeighbor(const NeighborInfo &info) noexcept override { + void FoundNeighbor(const NeighborInfo &info) noexcept override { printf("found '%s' (%s)\n", info.display_name.c_str(), info.uri.c_str()); } - virtual void LostNeighbor(const NeighborInfo &info) noexcept override { + void LostNeighbor(const NeighborInfo &info) noexcept override { printf("lost '%s' (%s)\n", info.display_name.c_str(), info.uri.c_str()); } diff --git a/test/visit_archive.cxx b/test/visit_archive.cxx index f699b03c2..2c82d5edc 100644 --- a/test/visit_archive.cxx +++ b/test/visit_archive.cxx @@ -54,7 +54,7 @@ public: class MyArchiveVisitor final : public ArchiveVisitor { public: - virtual void VisitArchiveEntry(const char *path_utf8) override { + void VisitArchiveEntry(const char *path_utf8) override { printf("%s\n", path_utf8); } };