diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 01:18:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 01:18:34 -0400 |
commit | 9126ed67acf17bb2009430cb6de25b2ffd783d8e (patch) | |
tree | 235eb9e377333520e026f568f020889dd9bdc21d /include | |
parent | 86a914ed7bf5316cad6dcac5f69cc3b300b40a23 (diff) | |
download | ingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.tar.gz ingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.tar.bz2 ingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.zip |
Make empty methods and trivial constructors noexcept
Diffstat (limited to 'include')
-rw-r--r-- | include/ingen/LV2Features.hpp | 2 | ||||
-rw-r--r-- | include/ingen/Module.hpp | 3 | ||||
-rw-r--r-- | include/ingen/Tee.hpp | 2 | ||||
-rw-r--r-- | include/ingen/client/ClientStore.hpp | 14 | ||||
-rw-r--r-- | include/ingen/memory.hpp | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/include/ingen/LV2Features.hpp b/include/ingen/LV2Features.hpp index f61b9b85..61183932 100644 --- a/include/ingen/LV2Features.hpp +++ b/include/ingen/LV2Features.hpp @@ -52,7 +52,7 @@ public: class EmptyFeature : public Feature { public: - explicit EmptyFeature(const char* uri) : _uri(uri) {} + explicit EmptyFeature(const char* uri) noexcept : _uri(uri) {} const char* uri() const override { return _uri; } diff --git a/include/ingen/Module.hpp b/include/ingen/Module.hpp index 149c25f9..8fe7b923 100644 --- a/include/ingen/Module.hpp +++ b/include/ingen/Module.hpp @@ -33,7 +33,8 @@ class World; */ class INGEN_API Module { public: - Module() : library(nullptr) {} + Module() noexcept : library(nullptr) {} + virtual ~Module() = default; Module(const Module&) = delete; diff --git a/include/ingen/Tee.hpp b/include/ingen/Tee.hpp index 1e6805cc..2158190f 100644 --- a/include/ingen/Tee.hpp +++ b/include/ingen/Tee.hpp @@ -34,7 +34,7 @@ class Tee : public Interface public: using Sinks = std::vector<std::shared_ptr<Interface>>; - explicit Tee(Sinks sinks) : _sinks(std::move(sinks)) {} + explicit Tee(Sinks sinks) noexcept : _sinks(std::move(sinks)) {} std::shared_ptr<Interface> respondee() const override { return _sinks.front()->respondee(); diff --git a/include/ingen/client/ClientStore.hpp b/include/ingen/client/ClientStore.hpp index 3aec363f..83cce726 100644 --- a/include/ingen/client/ClientStore.hpp +++ b/include/ingen/client/ClientStore.hpp @@ -78,22 +78,22 @@ public: void message(const Message& msg) override; - void operator()(const BundleBegin&) {} - void operator()(const BundleEnd&) {} + void operator()(const BundleBegin&) noexcept {} + void operator()(const BundleEnd&) noexcept {} void operator()(const Connect&); void operator()(const Copy&); void operator()(const Del&); void operator()(const Delta&); void operator()(const Disconnect&); void operator()(const DisconnectAll&); - void operator()(const Error&) {} - void operator()(const Get&) {} + void operator()(const Error&) noexcept {} + void operator()(const Get&) noexcept {} void operator()(const Move&); void operator()(const Put&); - void operator()(const Redo&) {} - void operator()(const Response&) {} + void operator()(const Redo&) noexcept {} + void operator()(const Response&) noexcept {} void operator()(const SetProperty&); - void operator()(const Undo&) {} + void operator()(const Undo&) noexcept {} INGEN_SIGNAL(new_object, void, std::shared_ptr<ObjectModel>) INGEN_SIGNAL(new_plugin, void, std::shared_ptr<PluginModel>) diff --git a/include/ingen/memory.hpp b/include/ingen/memory.hpp index 7d2e1db0..a1dba436 100644 --- a/include/ingen/memory.hpp +++ b/include/ingen/memory.hpp @@ -22,10 +22,10 @@ namespace ingen { template <class T> -void NullDeleter(T* ptr) {} +void NullDeleter(T* ptr) noexcept {} template <class T> -struct FreeDeleter { void operator()(T* const ptr) { free(ptr); } }; +struct FreeDeleter { void operator()(T* const ptr) noexcept { free(ptr); } }; } // namespace ingen |