summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-17 00:10:50 +0100
committerDavid Robillard <d@drobilla.net>2018-01-17 00:10:50 +0100
commitbd50ebb65df099d84fcf8978c7dc1db7db3b2917 (patch)
treed9d842e08c82dcb92ca4b4494b52953735cbb851 /src/server/events
parent3441b4268a070418b6d7b7266d93b265ba79f45f (diff)
downloadingen-bd50ebb65df099d84fcf8978c7dc1db7db3b2917.tar.gz
ingen-bd50ebb65df099d84fcf8978c7dc1db7db3b2917.tar.bz2
ingen-bd50ebb65df099d84fcf8978c7dc1db7db3b2917.zip
Clean up Engine component memory management and trim include tree
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/CreateBlock.cpp2
-rw-r--r--src/server/events/CreateGraph.cpp2
-rw-r--r--src/server/events/Delta.cpp4
-rw-r--r--src/server/events/Get.cpp2
-rw-r--r--src/server/events/Mark.cpp6
-rw-r--r--src/server/events/Undo.cpp4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index 1a70223c..eb307711 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -164,7 +164,7 @@ CreateBlock::post_process()
{
Broadcaster::Transfer t(*_engine.broadcaster());
if (respond() == Status::SUCCESS) {
- _update.send(_engine.broadcaster());
+ _update.send(*_engine.broadcaster());
}
}
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 7a2c7304..43b3bb97 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -215,7 +215,7 @@ CreateGraph::post_process()
{
Broadcaster::Transfer t(*_engine.broadcaster());
if (respond() == Status::SUCCESS) {
- _update.send(_engine.broadcaster());
+ _update.send(*_engine.broadcaster());
}
if (_graph) {
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index e120e610..b7cb9475 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -602,7 +602,7 @@ Delta::post_process()
}
if (respond() == Status::SUCCESS) {
- _update.send(_engine.broadcaster());
+ _update.send(*_engine.broadcaster());
switch (_type) {
case Type::SET:
@@ -625,7 +625,7 @@ Delta::post_process()
// Preset save
ClientUpdate response;
response.put(_preset->uri(), _preset->properties());
- response.send(_engine.broadcaster());
+ response.send(*_engine.broadcaster());
} else {
// Graph object put
_engine.broadcaster()->put(_subject, _properties, _context);
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index e4a5c760..84f6f251 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -101,7 +101,7 @@ Get::post_process()
props.insert(load_props.begin(), load_props.end());
_request_client->put(Raul::URI("ingen:/engine"), props);
} else {
- _response.send(_request_client.get());
+ _response.send(*_request_client);
}
}
}
diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp
index eb956f17..90b449d5 100644
--- a/src/server/events/Mark.cpp
+++ b/src/server/events/Mark.cpp
@@ -44,9 +44,9 @@ Mark::Mark(Engine& engine,
bool
Mark::pre_process(PreProcessContext& ctx)
{
- UndoStack* const stack = ((_mode == Mode::UNDO)
- ? _engine.redo_stack()
- : _engine.undo_stack());
+ const UPtr<UndoStack>& stack = ((_mode == Mode::UNDO)
+ ? _engine.redo_stack()
+ : _engine.undo_stack());
switch (_type) {
case Type::BUNDLE_BEGIN:
diff --git a/src/server/events/Undo.cpp b/src/server/events/Undo.cpp
index a6c80217..e06a5951 100644
--- a/src/server/events/Undo.cpp
+++ b/src/server/events/Undo.cpp
@@ -43,8 +43,8 @@ Undo::Undo(Engine& engine,
bool
Undo::pre_process(PreProcessContext& ctx)
{
- UndoStack* const stack = _is_redo ? _engine.redo_stack() : _engine.undo_stack();
- const Event::Mode mode = _is_redo ? Event::Mode::REDO : Event::Mode::UNDO;
+ const UPtr<UndoStack>& stack = _is_redo ? _engine.redo_stack() : _engine.undo_stack();
+ const Event::Mode mode = _is_redo ? Event::Mode::REDO : Event::Mode::UNDO;
if (stack->empty()) {
return Event::pre_process_done(Status::NOT_FOUND);