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.cpp1
-rw-r--r--src/libs/engine/events/DestroyEvent.hpp2
-rw-r--r--src/libs/engine/events/RenameEvent.cpp10
3 files changed, 7 insertions, 6 deletions
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index cf250f2f..59e6af5b 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -39,7 +39,6 @@ DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, Frame
: QueuedEvent(engine, responder, time, source, source),
_path(path),
_store_iterator(engine.object_store()->objects().end()),
- _removed_table(NULL),
_driver_port(NULL),
_patch_node_listnode(NULL),
_patch_port_listnode(NULL),
diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp
index 10e59751..4a82c5bb 100644
--- a/src/libs/engine/events/DestroyEvent.hpp
+++ b/src/libs/engine/events/DestroyEvent.hpp
@@ -60,7 +60,7 @@ public:
private:
Path _path;
ObjectStore::Objects::iterator _store_iterator;
- Table<Path, SharedPtr<Shared::GraphObject> > _removed_table;
+ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > _removed_table;
SharedPtr<NodeImpl> _node; ///< Non-NULL iff a node
SharedPtr<PortImpl> _port; ///< Non-NULL iff a port
DriverPort* _driver_port;
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index d0ef532a..1b563d11 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -77,10 +77,12 @@ RenameEvent::pre_process()
return;
}
- Table<Path, SharedPtr<Shared::GraphObject> > removed = _engine.object_store()->remove(_store_iterator);
- assert(removed.size() > 0);
+ SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed
+ = _engine.object_store()->remove(_store_iterator);
+
+ assert(removed->size() > 0);
- for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed.begin(); i != removed.end(); ++i) {
+ for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(_old_path, child_old_path));
@@ -94,7 +96,7 @@ RenameEvent::pre_process()
i->first = child_new_path;
}
- _engine.object_store()->add(removed);
+ _engine.object_store()->add(*removed.get());
QueuedEvent::pre_process();
}