summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Builder.cpp8
-rw-r--r--src/shared/LV2Features.cpp2
-rw-r--r--src/shared/Store.cpp10
3 files changed, 8 insertions, 12 deletions
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp
index 944b00ce..dadd2989 100644
--- a/src/shared/Builder.cpp
+++ b/src/shared/Builder.cpp
@@ -15,6 +15,7 @@
*/
#include "ingen/Edge.hpp"
+#include "ingen/GraphObject.hpp"
#include "ingen/Interface.hpp"
#include "ingen/shared/Builder.hpp"
#include "ingen/shared/URIs.hpp"
@@ -41,10 +42,9 @@ Builder::build(SharedPtr<const GraphObject> object)
void
Builder::connect(SharedPtr<const GraphObject> object)
{
- SharedPtr<const Patch> patch = PtrCast<const Patch>(object);
- if (patch) {
- for (Patch::Edges::const_iterator i = patch->edges().begin();
- i != patch->edges().end(); ++i) {
+ if (object->graph_type() == GraphObject::PATCH) {
+ for (GraphObject::Edges::const_iterator i = object->edges().begin();
+ i != object->edges().end(); ++i) {
_interface.connect(i->second->tail_path(), i->second->head_path());
}
return;
diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp
index 24b3f6fa..7061ff76 100644
--- a/src/shared/LV2Features.cpp
+++ b/src/shared/LV2Features.cpp
@@ -49,7 +49,7 @@ LV2Features::FeatureArray::~FeatureArray()
}
SharedPtr<LV2Features::FeatureArray>
-LV2Features::lv2_features(Shared::World* world, Node* node) const
+LV2Features::lv2_features(Shared::World* world, GraphObject* node) const
{
FeatureArray::FeatureVector vec;
for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) {
diff --git a/src/shared/Store.cpp b/src/shared/Store.cpp
index 821322e7..ad950fd7 100644
--- a/src/shared/Store.cpp
+++ b/src/shared/Store.cpp
@@ -17,8 +17,7 @@
#include <sstream>
#include <string>
-#include "ingen/Node.hpp"
-#include "ingen/Port.hpp"
+#include "ingen/GraphObject.hpp"
#include "ingen/shared/Store.hpp"
#include "raul/PathTable.hpp"
#include "raul/TableImpl.hpp"
@@ -39,11 +38,8 @@ Store::add(GraphObject* o)
insert(make_pair(o->path(), o));
- Node* node = dynamic_cast<Node*>(o);
- if (node) {
- for (uint32_t i=0; i < node->num_ports(); ++i) {
- add(node->port(i));
- }
+ for (uint32_t i = 0; i < o->num_ports(); ++i) {
+ add(o->port(i));
}
}