summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 18:03:43 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commitc35cbf038d0992887b8d4bcf5d4ff83c323ec60c (patch)
tree02384c6a8671e866a54cbd9f6002a3dd145116b9 /src/server
parent8215246d12f49573f7ebcdc62ddae84185c22bfe (diff)
downloadingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.tar.gz
ingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.tar.bz2
ingen-c35cbf038d0992887b8d4bcf5d4ff83c323ec60c.zip
Cleanup: Avoid parameter copying overhead
Diffstat (limited to 'src/server')
-rw-r--r--src/server/BlockImpl.cpp8
-rw-r--r--src/server/BlockImpl.hpp8
-rw-r--r--src/server/Broadcaster.cpp6
-rw-r--r--src/server/Broadcaster.hpp14
-rw-r--r--src/server/Engine.cpp6
-rw-r--r--src/server/Engine.hpp6
-rw-r--r--src/server/Event.hpp5
-rw-r--r--src/server/GraphImpl.cpp2
-rw-r--r--src/server/GraphImpl.hpp2
-rw-r--r--src/server/LV2Block.cpp8
-rw-r--r--src/server/LV2Block.hpp8
-rw-r--r--src/server/Task.cpp4
-rw-r--r--src/server/Task.hpp4
-rw-r--r--src/server/events/Connect.cpp8
-rw-r--r--src/server/events/Connect.hpp8
-rw-r--r--src/server/events/Copy.cpp8
-rw-r--r--src/server/events/Copy.hpp8
-rw-r--r--src/server/events/CreateBlock.cpp12
-rw-r--r--src/server/events/CreateBlock.hpp12
-rw-r--r--src/server/events/CreateGraph.cpp12
-rw-r--r--src/server/events/CreateGraph.hpp12
-rw-r--r--src/server/events/CreatePort.cpp12
-rw-r--r--src/server/events/CreatePort.hpp12
-rw-r--r--src/server/events/Delete.cpp8
-rw-r--r--src/server/events/Delete.hpp8
-rw-r--r--src/server/events/Delta.cpp18
-rw-r--r--src/server/events/Delta.hpp18
-rw-r--r--src/server/events/Disconnect.cpp2
-rw-r--r--src/server/events/Disconnect.hpp2
-rw-r--r--src/server/events/DisconnectAll.cpp2
-rw-r--r--src/server/events/DisconnectAll.hpp2
-rw-r--r--src/server/events/Get.cpp8
-rw-r--r--src/server/events/Get.hpp8
-rw-r--r--src/server/events/Mark.cpp4
-rw-r--r--src/server/events/Mark.hpp4
-rw-r--r--src/server/events/Move.cpp8
-rw-r--r--src/server/events/Move.hpp8
-rw-r--r--src/server/events/SetPortValue.cpp16
-rw-r--r--src/server/events/SetPortValue.hpp16
-rw-r--r--src/server/events/Undo.cpp18
-rw-r--r--src/server/events/Undo.hpp18
-rw-r--r--src/server/ingen_lv2.cpp2
42 files changed, 183 insertions, 172 deletions
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 263e6fce..abea85eb 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -294,10 +294,10 @@ BlockImpl::post_process(RunContext& context)
}
void
-BlockImpl::set_port_buffer(uint32_t voice,
- uint32_t port_num,
- BufferRef buf,
- SampleCount offset)
+BlockImpl::set_port_buffer(uint32_t voice,
+ uint32_t port_num,
+ const BufferRef& buf,
+ SampleCount offset)
{
/*std::cout << path() << " set port " << port_num << " voice " << voice
<< " buffer " << buf << " offset " << offset << std::endl;*/
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index c8c36ddf..15a4e075 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -133,10 +133,10 @@ public:
virtual void post_process(RunContext& context);
/** Set the buffer of a port to a given buffer (e.g. connect plugin to buffer) */
- virtual void set_port_buffer(uint32_t voice,
- uint32_t port_num,
- BufferRef buf,
- SampleCount offset);
+ virtual void set_port_buffer(uint32_t voice,
+ uint32_t port_num,
+ const BufferRef& buf,
+ SampleCount offset);
Node* port(uint32_t index) const override;
virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
diff --git a/src/server/Broadcaster.cpp b/src/server/Broadcaster.cpp
index c3fb82ef..914b891b 100644
--- a/src/server/Broadcaster.cpp
+++ b/src/server/Broadcaster.cpp
@@ -42,7 +42,7 @@ Broadcaster::~Broadcaster()
/** Register a client to receive messages over the notification band.
*/
void
-Broadcaster::register_client(SPtr<Interface> client)
+Broadcaster::register_client(const SPtr<Interface>& client)
{
std::lock_guard<std::mutex> lock(_clients_mutex);
_clients.insert(client);
@@ -53,7 +53,7 @@ Broadcaster::register_client(SPtr<Interface> client)
* @return true if client was found and removed.
*/
bool
-Broadcaster::unregister_client(SPtr<Interface> client)
+Broadcaster::unregister_client(const SPtr<Interface>& client)
{
std::lock_guard<std::mutex> lock(_clients_mutex);
const size_t erased = _clients.erase(client);
@@ -62,7 +62,7 @@ Broadcaster::unregister_client(SPtr<Interface> client)
}
void
-Broadcaster::set_broadcast(SPtr<Interface> client, bool broadcast)
+Broadcaster::set_broadcast(const SPtr<Interface>& client, bool broadcast)
{
if (broadcast) {
_broadcastees.insert(client);
diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp
index a2d75284..bf586c38 100644
--- a/src/server/Broadcaster.hpp
+++ b/src/server/Broadcaster.hpp
@@ -45,18 +45,22 @@ public:
Broadcaster();
~Broadcaster();
- void register_client(SPtr<Interface> client);
- bool unregister_client(SPtr<Interface> client);
+ void register_client(const SPtr<Interface>& client);
+ bool unregister_client(const SPtr<Interface>& client);
- void set_broadcast(SPtr<Interface> client, bool broadcast);
+ void set_broadcast(const SPtr<Interface>& client, bool broadcast);
/** Ignore a client when broadcasting.
*
* This is used to prevent feeding back updates to the client that
* initiated a property set in the first place.
*/
- void set_ignore_client(SPtr<Interface> client) { _ignore_client = client; }
- void clear_ignore_client() { _ignore_client.reset(); }
+ void set_ignore_client(const SPtr<Interface>& client)
+ {
+ _ignore_client = client;
+ }
+
+ void clear_ignore_client() { _ignore_client.reset(); }
/** Return true iff there are any clients with broadcasting enabled.
*
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 18feff1f..545ce72b 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -336,7 +336,7 @@ Engine::main_iteration()
}
void
-Engine::set_driver(SPtr<Driver> driver)
+Engine::set_driver(const SPtr<Driver>& driver)
{
_driver = driver;
for (const auto& ctx : _run_contexts) {
@@ -510,14 +510,14 @@ Engine::log() const
}
void
-Engine::register_client(SPtr<Interface> client)
+Engine::register_client(const SPtr<Interface>& client)
{
log().info("Registering client <%1%>\n", client->uri().c_str());
_broadcaster->register_client(client);
}
bool
-Engine::unregister_client(SPtr<Interface> client)
+Engine::unregister_client(const SPtr<Interface>& client)
{
log().info("Unregistering client <%1%>\n", client->uri().c_str());
return _broadcaster->unregister_client(client);
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index d1f2da3d..55099f45 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -93,15 +93,15 @@ public:
unsigned run(uint32_t sample_count) override;
void quit() override;
bool main_iteration() override;
- void register_client(SPtr<Interface> client) override;
- bool unregister_client(SPtr<Interface> client) override;
+ void register_client(const SPtr<Interface>& client) override;
+ bool unregister_client(const SPtr<Interface>& client) override;
void listen() override;
/** Return a random [0..1] float with uniform distribution */
float frand() { return _uniform_dist(_rand_engine); }
- void set_driver(SPtr<Driver> driver);
+ void set_driver(const SPtr<Driver>& driver);
/** Return the frame time to execute an event that arrived now.
*
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index 1bd61187..7da4b955 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -104,7 +104,10 @@ public:
inline Engine& engine() { return _engine; }
protected:
- Event(Engine& engine, SPtr<Interface> client, int32_t id, FrameTime time)
+ Event(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ FrameTime time)
: _engine(engine)
, _next(nullptr)
, _request_client(std::move(client))
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index c00819c2..db1b4561 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -271,7 +271,7 @@ GraphImpl::remove_block(BlockImpl& block)
}
void
-GraphImpl::add_arc(SPtr<ArcImpl> a)
+GraphImpl::add_arc(const SPtr<ArcImpl>& a)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
_arcs.emplace(std::make_pair(a->tail(), a->head()), a);
diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp
index 846996f3..a03d3faa 100644
--- a/src/server/GraphImpl.hpp
+++ b/src/server/GraphImpl.hpp
@@ -156,7 +156,7 @@ public:
/** Add an arc to this graph.
* Pre-processing thread only.
*/
- void add_arc(SPtr<ArcImpl> a);
+ void add_arc(const SPtr<ArcImpl>& a);
/** Remove an arc from this graph.
* Pre-processing thread only.
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index aa9339d1..d7406bb5 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -732,10 +732,10 @@ LV2Block::save_preset(const URI& uri,
}
void
-LV2Block::set_port_buffer(uint32_t voice,
- uint32_t port_num,
- BufferRef buf,
- SampleCount offset)
+LV2Block::set_port_buffer(uint32_t voice,
+ uint32_t port_num,
+ const BufferRef& buf,
+ SampleCount offset)
{
BlockImpl::set_port_buffer(voice, port_num, buf, offset);
lilv_instance_connect_port(
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index 07c04321..8046189e 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -85,10 +85,10 @@ public:
boost::optional<Resource> save_preset(const URI& uri,
const Properties& props) override;
- void set_port_buffer(uint32_t voice,
- uint32_t port_num,
- BufferRef buf,
- SampleCount offset) override;
+ void set_port_buffer(uint32_t voice,
+ uint32_t port_num,
+ const BufferRef& buf,
+ SampleCount offset) override;
static LilvState* load_state(World& world, const FilePath& path);
diff --git a/src/server/Task.cpp b/src/server/Task.cpp
index 0d76a43f..48da6040 100644
--- a/src/server/Task.cpp
+++ b/src/server/Task.cpp
@@ -140,7 +140,9 @@ Task::simplify(std::unique_ptr<Task>&& task)
}
void
-Task::dump(std::function<void (const std::string&)> sink, unsigned indent, bool first) const
+Task::dump(const std::function<void(const std::string&)>& sink,
+ unsigned indent,
+ bool first) const
{
if (!first) {
sink("\n");
diff --git a/src/server/Task.hpp b/src/server/Task.hpp
index a6489e61..e8b658c3 100644
--- a/src/server/Task.hpp
+++ b/src/server/Task.hpp
@@ -73,7 +73,9 @@ public:
void run(RunContext& context);
/** Pretty print task to the given stream (recursively). */
- void dump(std::function<void (const std::string&)> sink, unsigned indent, bool first) const;
+ void dump(const std::function<void(const std::string&)>& sink,
+ unsigned indent,
+ bool first) const;
/** Return true iff this is an empty task. */
bool empty() const { return _mode != Mode::SINGLE && _children.empty(); }
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index d27e1e3b..23a7d4b4 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -38,10 +38,10 @@ namespace ingen {
namespace server {
namespace events {
-Connect::Connect(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Connect& msg)
+Connect::Connect(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Connect& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
, _graph(nullptr)
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 625fa39d..adc80afc 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -38,10 +38,10 @@ namespace events {
class Connect : public Event
{
public:
- Connect(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Connect& msg);
+ Connect(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Connect& msg);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp
index 38cbc6d8..a8e08924 100644
--- a/src/server/events/Copy.cpp
+++ b/src/server/events/Copy.cpp
@@ -36,10 +36,10 @@ namespace ingen {
namespace server {
namespace events {
-Copy::Copy(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Copy& msg)
+Copy::Copy(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Copy& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
, _old_block(nullptr)
diff --git a/src/server/events/Copy.hpp b/src/server/events/Copy.hpp
index 86a95e9c..26673a55 100644
--- a/src/server/events/Copy.hpp
+++ b/src/server/events/Copy.hpp
@@ -35,10 +35,10 @@ namespace events {
class Copy : public Event
{
public:
- Copy(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Copy& msg);
+ Copy(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Copy& msg);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index cfeb0e3d..e8816954 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -38,12 +38,12 @@ namespace ingen {
namespace server {
namespace events {
-CreateBlock::CreateBlock(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- Properties& properties)
+CreateBlock::CreateBlock(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _properties(properties)
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp
index bf34f6e2..00f58008 100644
--- a/src/server/events/CreateBlock.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -38,12 +38,12 @@ namespace events {
class CreateBlock : public Event
{
public:
- CreateBlock(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- Properties& properties);
+ CreateBlock(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ Properties& properties);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 5561d147..3e847bdd 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -35,12 +35,12 @@ namespace ingen {
namespace server {
namespace events {
-CreateGraph::CreateGraph(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Properties& properties)
+CreateGraph::CreateGraph(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _properties(properties)
diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp
index 6ea07957..dadb644e 100644
--- a/src/server/events/CreateGraph.hpp
+++ b/src/server/events/CreateGraph.hpp
@@ -40,12 +40,12 @@ namespace events {
class CreateGraph : public Event
{
public:
- CreateGraph(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Properties& properties);
+ CreateGraph(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 09eb8cff..d1b4f114 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -40,12 +40,12 @@ namespace ingen {
namespace server {
namespace events {
-CreatePort::CreatePort(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Properties& properties)
+CreatePort::CreatePort(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _port_type(PortType::UNKNOWN)
diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp
index 9c5bb396..8137328d 100644
--- a/src/server/events/CreatePort.hpp
+++ b/src/server/events/CreatePort.hpp
@@ -44,12 +44,12 @@ namespace events {
class CreatePort : public Event
{
public:
- CreatePort(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Properties& properties);
+ CreatePort(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Properties& properties);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index 0b46f3f4..5d605bca 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -43,10 +43,10 @@ namespace ingen {
namespace server {
namespace events {
-Delete::Delete(Engine& engine,
- SPtr<Interface> client,
- FrameTime timestamp,
- const ingen::Del& msg)
+Delete::Delete(Engine& engine,
+ const SPtr<Interface>& client,
+ FrameTime timestamp,
+ const ingen::Del& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
, _engine_port(nullptr)
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index 14acac83..6b3149e9 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -45,10 +45,10 @@ class DisconnectAll;
class Delete : public Event
{
public:
- Delete(Engine& engine,
- SPtr<Interface> client,
- FrameTime timestamp,
- const ingen::Del& msg);
+ Delete(Engine& engine,
+ const SPtr<Interface>& client,
+ FrameTime timestamp,
+ const ingen::Del& msg);
~Delete();
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index f5928c12..19e5bb20 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -48,10 +48,10 @@ class PreProcessContext;
namespace events {
-Delta::Delta(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Put& msg)
+Delta::Delta(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Put& msg)
: Event(engine, client, msg.seq, timestamp)
, _create_event(nullptr)
, _subject(msg.uri)
@@ -67,10 +67,10 @@ Delta::Delta(Engine& engine,
init();
}
-Delta::Delta(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Delta& msg)
+Delta::Delta(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Delta& msg)
: Event(engine, client, msg.seq, timestamp)
, _create_event(nullptr)
, _subject(msg.uri)
@@ -88,7 +88,7 @@ Delta::Delta(Engine& engine,
}
Delta::Delta(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::SetProperty& msg)
: Event(engine, client, msg.seq, timestamp)
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index 4328ad83..2aa2ff90 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -47,18 +47,18 @@ class SetPortValue;
class Delta : public Event
{
public:
- Delta(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Put& msg);
+ Delta(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Put& msg);
- Delta(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Delta& msg);
+ Delta(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Delta& msg);
Delta(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::SetProperty& msg);
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index 349fb6ae..531d70af 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -44,7 +44,7 @@ namespace server {
namespace events {
Disconnect::Disconnect(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::Disconnect& msg)
: Event(engine, client, msg.seq, timestamp)
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index 15872ba5..ec638c73 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -38,7 +38,7 @@ class Disconnect : public Event
{
public:
Disconnect(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::Disconnect& msg);
diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp
index 9c949480..ada51302 100644
--- a/src/server/events/DisconnectAll.cpp
+++ b/src/server/events/DisconnectAll.cpp
@@ -41,7 +41,7 @@ namespace server {
namespace events {
DisconnectAll::DisconnectAll(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::DisconnectAll& msg)
: Event(engine, client, msg.seq, timestamp)
diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp
index 3edfedd6..9ab908c1 100644
--- a/src/server/events/DisconnectAll.hpp
+++ b/src/server/events/DisconnectAll.hpp
@@ -44,7 +44,7 @@ class DisconnectAll : public Event
{
public:
DisconnectAll(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::DisconnectAll& msg);
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 167f5f91..7bb6fd2f 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -37,10 +37,10 @@ namespace ingen {
namespace server {
namespace events {
-Get::Get(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Get& msg)
+Get::Get(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Get& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
, _object(nullptr)
diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp
index b23c7294..e24c9998 100644
--- a/src/server/events/Get.hpp
+++ b/src/server/events/Get.hpp
@@ -39,10 +39,10 @@ namespace events {
class Get : public Event
{
public:
- Get(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Get& msg);
+ Get(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Get& msg);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override {}
diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp
index 4f9b1261..314805f5 100644
--- a/src/server/events/Mark.cpp
+++ b/src/server/events/Mark.cpp
@@ -27,7 +27,7 @@ namespace server {
namespace events {
Mark::Mark(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::BundleBegin& msg)
: Event(engine, client, msg.seq, timestamp)
@@ -36,7 +36,7 @@ Mark::Mark(Engine& engine,
{}
Mark::Mark(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::BundleEnd& msg)
: Event(engine, client, msg.seq, timestamp)
diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp
index ad8cb66b..c32c2588 100644
--- a/src/server/events/Mark.hpp
+++ b/src/server/events/Mark.hpp
@@ -41,12 +41,12 @@ class Mark : public Event
{
public:
Mark(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::BundleBegin& msg);
Mark(Engine& engine,
- SPtr<Interface> client,
+ const SPtr<Interface>& client,
SampleCount timestamp,
const ingen::BundleEnd& msg);
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index c7478898..857be189 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -31,10 +31,10 @@ namespace ingen {
namespace server {
namespace events {
-Move::Move(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Move& msg)
+Move::Move(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Move& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
{
diff --git a/src/server/events/Move.hpp b/src/server/events/Move.hpp
index 327b31b9..b4487b78 100644
--- a/src/server/events/Move.hpp
+++ b/src/server/events/Move.hpp
@@ -36,10 +36,10 @@ namespace events {
class Move : public Event
{
public:
- Move(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Move& msg);
+ Move(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Move& msg);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp
index 9193f876..02f3f66b 100644
--- a/src/server/events/SetPortValue.cpp
+++ b/src/server/events/SetPortValue.cpp
@@ -37,14 +37,14 @@ namespace server {
namespace events {
/** Internal */
-SetPortValue::SetPortValue(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- PortImpl* port,
- const Atom& value,
- bool activity,
- bool synthetic)
+SetPortValue::SetPortValue(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ PortImpl* port,
+ const Atom& value,
+ bool activity,
+ bool synthetic)
: Event(engine, client, id, timestamp)
, _port(port)
, _value(value)
diff --git a/src/server/events/SetPortValue.hpp b/src/server/events/SetPortValue.hpp
index 1e7c7250..99d55af3 100644
--- a/src/server/events/SetPortValue.hpp
+++ b/src/server/events/SetPortValue.hpp
@@ -40,14 +40,14 @@ namespace events {
class SetPortValue : public Event
{
public:
- SetPortValue(Engine& engine,
- SPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- PortImpl* port,
- const Atom& value,
- bool activity,
- bool synthetic = false);
+ SetPortValue(Engine& engine,
+ const SPtr<Interface>& client,
+ int32_t id,
+ SampleCount timestamp,
+ PortImpl* port,
+ const Atom& value,
+ bool activity,
+ bool synthetic = false);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/events/Undo.cpp b/src/server/events/Undo.cpp
index 3a3bdbe2..0741e60d 100644
--- a/src/server/events/Undo.cpp
+++ b/src/server/events/Undo.cpp
@@ -27,24 +27,24 @@ namespace ingen {
namespace server {
namespace events {
-Undo::Undo(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Undo& msg)
+Undo::Undo(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Undo& msg)
: Event(engine, client, msg.seq, timestamp)
, _is_redo(false)
{}
-Undo::Undo(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Redo& msg)
+Undo::Undo(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Redo& msg)
: Event(engine, client, msg.seq, timestamp)
, _is_redo(true)
{}
bool
-Undo::pre_process(PreProcessContext& ctx)
+Undo::pre_process(PreProcessContext&)
{
const UPtr<UndoStack>& stack = _is_redo ? _engine.redo_stack() : _engine.undo_stack();
const Event::Mode mode = _is_redo ? Event::Mode::REDO : Event::Mode::UNDO;
diff --git a/src/server/events/Undo.hpp b/src/server/events/Undo.hpp
index f8469960..e36ebaad 100644
--- a/src/server/events/Undo.hpp
+++ b/src/server/events/Undo.hpp
@@ -32,15 +32,15 @@ namespace events {
class Undo : public Event
{
public:
- Undo(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Undo& msg);
-
- Undo(Engine& engine,
- SPtr<Interface> client,
- SampleCount timestamp,
- const ingen::Redo& msg);
+ Undo(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Undo& msg);
+
+ Undo(Engine& engine,
+ const SPtr<Interface>& client,
+ SampleCount timestamp,
+ const ingen::Redo& msg);
bool pre_process(PreProcessContext& ctx) override;
void execute(RunContext& context) override;
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 5ef3a321..57663344 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -425,7 +425,7 @@ using namespace ingen;
using namespace ingen::server;
static void
-ingen_lv2_main(SPtr<Engine> engine, const SPtr<LV2Driver>& driver)
+ingen_lv2_main(const SPtr<Engine>& engine, const SPtr<LV2Driver>& driver)
{
while (true) {
// Wait until there is work to be done