diff options
Diffstat (limited to 'src/server')
-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 |
7 files changed, 13 insertions, 10 deletions
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; } |