diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/BreadCrumbs.hpp | 6 | ||||
-rw-r--r-- | src/gui/PluginMenu.hpp | 2 | ||||
-rw-r--r-- | src/server/CompiledGraph.hpp | 2 | ||||
-rw-r--r-- | src/server/ControlBindings.cpp | 2 | ||||
-rw-r--r-- | src/server/ControlBindings.hpp | 8 | ||||
-rw-r--r-- | src/server/SocketListener.hpp | 2 | ||||
-rw-r--r-- | src/server/Task.hpp | 4 | ||||
-rw-r--r-- | src/server/UndoStack.hpp | 3 | ||||
-rw-r--r-- | src/server/Worker.hpp | 2 |
9 files changed, 19 insertions, 12 deletions
diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp index 6501288d..931d2ba8 100644 --- a/src/gui/BreadCrumbs.hpp +++ b/src/gui/BreadCrumbs.hpp @@ -71,7 +71,7 @@ private: { public: BreadCrumb(const raul::Path& path, - const std::shared_ptr<GraphView>& view = nullptr) + const std::shared_ptr<GraphView>& view) : _path(path), _view(view) { assert(!view || view->graph()->path() == path); @@ -81,6 +81,10 @@ private: show_all(); } + explicit BreadCrumb(const raul::Path& path) + : BreadCrumb{path, nullptr} + {} + void set_view(const std::shared_ptr<GraphView>& view) { assert(!view || view->graph()->path() == _path); _view = view; diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp index b2c75ffe..82e2f13b 100644 --- a/src/gui/PluginMenu.hpp +++ b/src/gui/PluginMenu.hpp @@ -50,7 +50,7 @@ namespace gui { class PluginMenu : public Gtk::Menu { public: - PluginMenu(ingen::World& world); + explicit PluginMenu(ingen::World& world); void clear(); void add_plugin(const std::shared_ptr<client::PluginModel>& p); diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp index 89aab289..acf7ed88 100644 --- a/src/server/CompiledGraph.hpp +++ b/src/server/CompiledGraph.hpp @@ -46,7 +46,7 @@ public: void run(RunContext& ctx); private: - CompiledGraph(GraphImpl* graph); + explicit CompiledGraph(GraphImpl* graph); using BlockSet = std::set<BlockImpl*>; diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index e8dd3554..e9002f99 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -249,7 +249,7 @@ ControlBindings::start_learn(PortImpl* port) ThreadManager::assert_thread(THREAD_PRE_PROCESS); Binding* b = _learn_binding.load(); if (!b) { - _learn_binding = new Binding(Type::NULL_CONTROL, port); + _learn_binding = new Binding(); } else { b->port = port; } diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp index a4ed0f94..4c806265 100644 --- a/src/server/ControlBindings.hpp +++ b/src/server/ControlBindings.hpp @@ -60,9 +60,8 @@ public: }; struct Key { - Key(Type t = Type::NULL_CONTROL, int16_t n = 0) noexcept - : type(t), num(n) - {} + Key(Type t, int16_t n) noexcept : type{t}, num{n} {} + Key() noexcept : Key{Type::NULL_CONTROL, 0U} {} bool operator<(const Key& other) const { return ((type < other.type) || @@ -82,7 +81,8 @@ public: /** One binding of a controller to a port. */ struct Binding : public boost::intrusive::set_base_hook<>, public raul::Maid::Disposable { - Binding(Key k=Key(), PortImpl* p=nullptr) : key(k), port(p) {} + Binding(Key k, PortImpl* p) noexcept : key{k}, port{p} {} + Binding() noexcept : Binding{Key{}, nullptr} {} bool operator<(const Binding& rhs) const { return key < rhs.key; } diff --git a/src/server/SocketListener.hpp b/src/server/SocketListener.hpp index 65df5af5..8979a768 100644 --- a/src/server/SocketListener.hpp +++ b/src/server/SocketListener.hpp @@ -27,7 +27,7 @@ class Engine; class SocketListener { public: - SocketListener(Engine& engine); + explicit SocketListener(Engine& engine); ~SocketListener(); private: diff --git a/src/server/Task.hpp b/src/server/Task.hpp index c665c16f..f2141bd5 100644 --- a/src/server/Task.hpp +++ b/src/server/Task.hpp @@ -39,13 +39,15 @@ public: PARALLEL ///< Elements may be run in any order in parallel }; - Task(Mode mode, BlockImpl* block = nullptr) + Task(Mode mode, BlockImpl* block) : _block(block) , _mode(mode) { assert(mode != Mode::SINGLE || block); } + explicit Task(Mode mode) : Task{mode, nullptr} {} + Task(const Task&) = delete; Task& operator=(const Task&) = delete; diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp index 8954f05d..58528647 100644 --- a/src/server/UndoStack.hpp +++ b/src/server/UndoStack.hpp @@ -42,7 +42,8 @@ class INGEN_SERVER_API UndoStack : public AtomSink { public: struct Entry { - Entry(time_t t = 0) noexcept : time(t) {} + explicit Entry(time_t t) noexcept : time{t} {} + Entry() noexcept : Entry{0} {} Entry(const Entry& copy) : time(copy.time) diff --git a/src/server/Worker.hpp b/src/server/Worker.hpp index 540347df..e26ff224 100644 --- a/src/server/Worker.hpp +++ b/src/server/Worker.hpp @@ -44,7 +44,7 @@ public: ~Worker(); struct Schedule : public LV2Features::Feature { - Schedule(bool sync) noexcept : synchronous(sync) {} + explicit Schedule(bool sync) noexcept : synchronous(sync) {} const char* uri() const override { return LV2_WORKER__schedule; } |