diff options
author | David Robillard <d@drobilla.net> | 2020-08-01 21:31:04 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 01:48:48 +0200 |
commit | c0de5d2620cc1ee227ff2c64ef163e308ba19cb4 (patch) | |
tree | e0958e92ab78cb5f17f9073ab75faaec9912b847 | |
parent | 7b70b455e6199b508217b021d9a0dfc08f9a7794 (diff) | |
download | ingen-c0de5d2620cc1ee227ff2c64ef163e308ba19cb4.tar.gz ingen-c0de5d2620cc1ee227ff2c64ef163e308ba19cb4.tar.bz2 ingen-c0de5d2620cc1ee227ff2c64ef163e308ba19cb4.zip |
Use explicit default for trivial constructors
-rw-r--r-- | .clang-tidy | 2 | ||||
-rw-r--r-- | ingen/Interface.hpp | 2 | ||||
-rw-r--r-- | ingen/client/SigClientInterface.hpp | 2 | ||||
-rw-r--r-- | src/gui/GraphCanvas.hpp | 2 | ||||
-rw-r--r-- | src/gui/SubgraphModule.hpp | 2 | ||||
-rw-r--r-- | src/server/PluginImpl.hpp | 7 | ||||
-rw-r--r-- | src/server/RunContext.hpp | 5 | ||||
-rw-r--r-- | src/server/Task.hpp | 6 |
8 files changed, 13 insertions, 15 deletions
diff --git a/.clang-tidy b/.clang-tidy index f2b07217..eee67bc7 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -9,8 +9,6 @@ Checks: > -*non-private-member-variables-in-classes, -*special-member-functions, -*uppercase-literal-suffix, - -*use-equals-default, - -*use-equals-delete, -*use-override, -android-cloexec-fopen, -bugprone-branch-clone, diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp index 33180364..c0cdb4d9 100644 --- a/ingen/Interface.hpp +++ b/ingen/Interface.hpp @@ -49,7 +49,7 @@ class INGEN_API Interface public: using result_type = void; - Interface() {} + Interface() = default; virtual ~Interface() = default; diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp index e9c8cd0e..674714a3 100644 --- a/ingen/client/SigClientInterface.hpp +++ b/ingen/client/SigClientInterface.hpp @@ -42,7 +42,7 @@ class INGEN_API SigClientInterface : public ingen::Interface, public INGEN_TRACKABLE { public: - SigClientInterface() {} + SigClientInterface() = default; URI uri() const override { return URI("ingen:/clients/sig"); } diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index ed43b970..9237f607 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -52,7 +52,7 @@ public: int width, int height); - virtual ~GraphCanvas() {} + virtual ~GraphCanvas() = default; App& app() { return _app; } diff --git a/src/gui/SubgraphModule.hpp b/src/gui/SubgraphModule.hpp index 8ce4f063..c332d676 100644 --- a/src/gui/SubgraphModule.hpp +++ b/src/gui/SubgraphModule.hpp @@ -43,7 +43,7 @@ public: SubgraphModule(GraphCanvas& canvas, SPtr<const client::GraphModel> graph); - virtual ~SubgraphModule() {} + virtual ~SubgraphModule() = default; bool on_double_click(GdkEventButton* event) override; diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp index 3c93aa21..e209dbc9 100644 --- a/src/server/PluginImpl.hpp +++ b/src/server/PluginImpl.hpp @@ -48,6 +48,9 @@ public: { } + PluginImpl(const PluginImpl&) = delete; + PluginImpl& operator=(const PluginImpl&) = delete; + virtual BlockImpl* instantiate(BufferFactory& bufs, const Raul::Symbol& symbol, bool polyphonic, @@ -84,10 +87,6 @@ protected: Presets _presets; bool _presets_loaded; bool _is_zombie; - -private: - PluginImpl(const PluginImpl&) = delete; - PluginImpl& operator=(const PluginImpl&) = delete; }; } // namespace server diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp index 0ba4916b..7859d545 100644 --- a/src/server/RunContext.hpp +++ b/src/server/RunContext.hpp @@ -68,6 +68,9 @@ public: */ RunContext(const RunContext& copy); + RunContext& operator=(const RunContext&) = delete; + RunContext& operator=(RunContext&&) = delete; + /** Return true iff the given port should broadcast its value. * * Whether or not broadcasting is actually done is a per-client property, @@ -138,8 +141,6 @@ public: inline bool realtime() const { return _realtime; } protected: - const RunContext& operator=(const RunContext& copy) = delete; - void run(); Engine& _engine; ///< Engine we're running in diff --git a/src/server/Task.hpp b/src/server/Task.hpp index 9f1e6dae..19fd6cad 100644 --- a/src/server/Task.hpp +++ b/src/server/Task.hpp @@ -49,6 +49,9 @@ public: assert(!(mode == Mode::SINGLE && !block)); } + Task(const Task&) = delete; + Task& operator=(const Task&) = delete; + Task(Task&& task) : _children(std::move(task._children)) , _block(task._block) @@ -100,9 +103,6 @@ public: private: using Children = std::deque<std::unique_ptr<Task>>; - Task(const Task&) = delete; - Task& operator=(const Task&) = delete; - Task* get_task(RunContext& ctx); void append(std::unique_ptr<Task>&& t) { |