From 4c52001a350ca573fd19f910f2f808d5f31cf95b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Feb 2020 13:47:16 +0100 Subject: [PATCH] *: use defaulted destructors --- src/input/InputStream.cxx | 4 +--- src/input/TextInputStream.cxx | 2 +- src/neighbor/Glue.cxx | 4 ++-- src/output/Source.cxx | 5 ++++- src/storage/CompositeStorage.cxx | 9 ++------- test/DumpDatabase.cxx | 3 +-- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx index 684dfb95b..3e184d901 100644 --- a/src/input/InputStream.cxx +++ b/src/input/InputStream.cxx @@ -26,9 +26,7 @@ #include -InputStream::~InputStream() noexcept -{ -} +InputStream::~InputStream() noexcept = default; void InputStream::Check() diff --git a/src/input/TextInputStream.cxx b/src/input/TextInputStream.cxx index 18883a1c2..2cb3cfd0e 100644 --- a/src/input/TextInputStream.cxx +++ b/src/input/TextInputStream.cxx @@ -26,7 +26,7 @@ TextInputStream::TextInputStream(InputStreamPtr &&_is) noexcept :is(std::move(_is)) {} -TextInputStream::~TextInputStream() noexcept {} +TextInputStream::~TextInputStream() noexcept = default; char * TextInputStream::ReadLine() diff --git a/src/neighbor/Glue.cxx b/src/neighbor/Glue.cxx index 20eeb72e5..69df3a195 100644 --- a/src/neighbor/Glue.cxx +++ b/src/neighbor/Glue.cxx @@ -28,8 +28,8 @@ #include -NeighborGlue::NeighborGlue() noexcept {} -NeighborGlue::~NeighborGlue() noexcept {} +NeighborGlue::NeighborGlue() noexcept = default; +NeighborGlue::~NeighborGlue() noexcept = default; static std::unique_ptr CreateNeighborExplorer(EventLoop &loop, NeighborListener &listener, diff --git a/src/output/Source.cxx b/src/output/Source.cxx index c853c43e1..f69a6091d 100644 --- a/src/output/Source.cxx +++ b/src/output/Source.cxx @@ -29,7 +29,10 @@ #include -AudioOutputSource::AudioOutputSource() noexcept {} +AudioOutputSource::AudioOutputSource() noexcept +{ +} + AudioOutputSource::~AudioOutputSource() noexcept = default; AudioFormat diff --git a/src/storage/CompositeStorage.cxx b/src/storage/CompositeStorage.cxx index 3c0d0e6f9..26de24e56 100644 --- a/src/storage/CompositeStorage.cxx +++ b/src/storage/CompositeStorage.cxx @@ -179,13 +179,8 @@ CompositeStorage::Directory::MapToRelativeUTF8(std::string &buffer, return false; } -CompositeStorage::CompositeStorage() noexcept -{ -} - -CompositeStorage::~CompositeStorage() -{ -} +CompositeStorage::CompositeStorage() noexcept = default; +CompositeStorage::~CompositeStorage() = default; Storage * CompositeStorage::GetMount(const char *uri) noexcept diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx index 82a83eac6..827e04f41 100644 --- a/test/DumpDatabase.cxx +++ b/test/DumpDatabase.cxx @@ -49,8 +49,7 @@ public: io_thread.Start(); } - ~GlobalInit() { - } + ~GlobalInit() = default; EventLoop &GetEventLoop() { return io_thread.GetEventLoop();