summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp33
-rw-r--r--src/libs/engine/events/DestroyEvent.hpp1
2 files changed, 6 insertions, 28 deletions
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index 38a8fe3e..2c4fd7da 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -54,24 +54,6 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame
assert(_source);
}
-#if 0
-DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block)
-: QueuedEvent(engine, responder, block, source),
- _path(node->path()),
- _store_iterator(engine.object_store()->objects().end())
- _object(node),
- _node(node),
- _port(NULL),
- _driver_port(NULL),
- _patch_node_listnode(NULL),
- _patch_port_listnode(NULL),
- _ports_array(NULL),
- _compiled_patch(NULL),
- _disconnect_node_event(NULL),
- _disconnect_port_event(NULL)
-{
-}
-#endif
DestroyEvent::~DestroyEvent()
{
@@ -83,17 +65,14 @@ DestroyEvent::~DestroyEvent()
void
DestroyEvent::pre_process()
{
- //if (_object == NULL) {
- _store_iterator = _engine.object_store()->find(_path);
- //_object = _engine.object_store()->find_object(_path);
+ _store_iterator = _engine.object_store()->find(_path);
- if (_store_iterator != _engine.object_store()->objects().end()) {
- _node = dynamic_cast<Node*>(_store_iterator->second);
+ if (_store_iterator != _engine.object_store()->objects().end()) {
+ _node = dynamic_cast<Node*>(_store_iterator->second);
- if (!_node)
- _port = dynamic_cast<Port*>(_store_iterator->second);
- }
- //}
+ if (!_node)
+ _port = dynamic_cast<Port*>(_store_iterator->second);
+ }
if (_store_iterator != _engine.object_store()->objects().end()) {
_table = _engine.object_store()->remove(_store_iterator);
diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp
index c401ff31..ed4328f6 100644
--- a/src/libs/engine/events/DestroyEvent.hpp
+++ b/src/libs/engine/events/DestroyEvent.hpp
@@ -52,7 +52,6 @@ class DestroyEvent : public QueuedEvent
{
public:
DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true);
- //DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true);
~DestroyEvent();
void pre_process();