diff options
author | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-12 23:38:03 +0000 |
commit | df1447c665e6c3631961297a9d3e9aff4e94c47f (patch) | |
tree | c0ff117c362e6d571f430f886ab62f372b59af08 /src/client | |
parent | bb335dca695273622b7a4ebbefbe9e089edb9ab4 (diff) | |
download | ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.gz ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.bz2 ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.zip |
Remove Raul::SharedPtr and switch to std::shared_ptr.
Use project local short type aliases for shared_ptr and friends.
Move Raul::Disposable and Raul::Manageable into Raul::Maid.
Use sets to store machina nodes and edges to avoid O(n) searches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4939 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/BlockModel.cpp | 42 | ||||
-rw-r--r-- | src/client/ClientStore.cpp | 94 | ||||
-rw-r--r-- | src/client/GraphModel.cpp | 26 | ||||
-rw-r--r-- | src/client/ObjectModel.cpp | 4 | ||||
-rw-r--r-- | src/client/PluginModel.cpp | 10 | ||||
-rw-r--r-- | src/client/PluginUI.cpp | 20 | ||||
-rw-r--r-- | src/client/PortModel.cpp | 4 | ||||
-rw-r--r-- | src/client/ingen_client.cpp | 4 |
8 files changed, 102 insertions, 102 deletions
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp index eb982f0d..0ed58c7a 100644 --- a/src/client/BlockModel.cpp +++ b/src/client/BlockModel.cpp @@ -25,9 +25,9 @@ namespace Ingen { namespace Client { -BlockModel::BlockModel(URIs& uris, - SharedPtr<PluginModel> plugin, - const Raul::Path& path) +BlockModel::BlockModel(URIs& uris, + SPtr<PluginModel> plugin, + const Raul::Path& path) : ObjectModel(uris, path) , _plugin_uri(plugin->uri()) , _plugin(plugin) @@ -65,7 +65,7 @@ BlockModel::~BlockModel() } void -BlockModel::remove_port(SharedPtr<PortModel> port) +BlockModel::remove_port(SPtr<PortModel> port) { for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) { if ((*i) == port) { @@ -99,26 +99,26 @@ BlockModel::clear() } void -BlockModel::add_child(SharedPtr<ObjectModel> c) +BlockModel::add_child(SPtr<ObjectModel> c) { assert(c->parent().get() == this); //ObjectModel::add_child(c); - SharedPtr<PortModel> pm = PtrCast<PortModel>(c); + SPtr<PortModel> pm = dynamic_ptr_cast<PortModel>(c); assert(pm); add_port(pm); } bool -BlockModel::remove_child(SharedPtr<ObjectModel> c) +BlockModel::remove_child(SPtr<ObjectModel> c) { assert(c->path().is_child_of(path())); assert(c->parent().get() == this); //bool ret = ObjectModel::remove_child(c); - SharedPtr<PortModel> pm = PtrCast<PortModel>(c); + SPtr<PortModel> pm = dynamic_ptr_cast<PortModel>(c); assert(pm); remove_port(pm); @@ -127,7 +127,7 @@ BlockModel::remove_child(SharedPtr<ObjectModel> c) } void -BlockModel::add_port(SharedPtr<PortModel> pm) +BlockModel::add_port(SPtr<PortModel> pm) { assert(pm); assert(pm->path().is_child_of(path())); @@ -140,13 +140,13 @@ BlockModel::add_port(SharedPtr<PortModel> pm) _signal_new_port.emit(pm); } -SharedPtr<const PortModel> +SPtr<const PortModel> BlockModel::get_port(const Raul::Symbol& symbol) const { for (auto p : _ports) if (p->symbol() == symbol) return p; - return SharedPtr<PortModel>(); + return SPtr<PortModel>(); } Ingen::Node* @@ -158,10 +158,10 @@ BlockModel::port(uint32_t index) const } void -BlockModel::default_port_value_range(SharedPtr<const PortModel> port, - float& min, - float& max, - uint32_t srate) const +BlockModel::default_port_value_range(SPtr<const PortModel> port, + float& min, + float& max, + uint32_t srate) const { // Default control values min = 0.0; @@ -190,8 +190,10 @@ BlockModel::default_port_value_range(SharedPtr<const PortModel> port, } void -BlockModel::port_value_range(SharedPtr<const PortModel> port, - float& min, float& max, uint32_t srate) const +BlockModel::port_value_range(SPtr<const PortModel> port, + float& min, + float& max, + uint32_t srate) const { assert(port->parent().get() == this); @@ -228,7 +230,7 @@ BlockModel::label() const } std::string -BlockModel::port_label(SharedPtr<const PortModel> port) const +BlockModel::port_label(SPtr<const PortModel> port) const { const Raul::Atom& name = port->get_property(Raul::URI(LV2_CORE__name)); if (name.is_valid()) { @@ -255,9 +257,9 @@ BlockModel::port_label(SharedPtr<const PortModel> port) const } void -BlockModel::set(SharedPtr<ObjectModel> model) +BlockModel::set(SPtr<ObjectModel> model) { - SharedPtr<BlockModel> block = PtrCast<BlockModel>(model); + SPtr<BlockModel> block = dynamic_ptr_cast<BlockModel>(model); if (block) { _plugin_uri = block->_plugin_uri; _plugin = block->_plugin; diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index 318d31a5..8c48ab72 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -31,10 +31,10 @@ using namespace std; namespace Ingen { namespace Client { -ClientStore::ClientStore(URIs& uris, - Log& log, - SharedPtr<Interface> engine, - SharedPtr<SigClientInterface> emitter) +ClientStore::ClientStore(URIs& uris, + Log& log, + SPtr<Interface> engine, + SPtr<SigClientInterface> emitter) : _uris(uris) , _log(log) , _engine(engine) @@ -66,16 +66,16 @@ ClientStore::clear() } void -ClientStore::add_object(SharedPtr<ObjectModel> object) +ClientStore::add_object(SPtr<ObjectModel> object) { // If we already have "this" object, merge the existing one into the new // one (with precedence to the new values). iterator existing = find(object->path()); if (existing != end()) { - PtrCast<ObjectModel>(existing->second)->set(object); + dynamic_ptr_cast<ObjectModel>(existing->second)->set(object); } else { if (!object->path().is_root()) { - SharedPtr<ObjectModel> parent = _object(object->path().parent()); + SPtr<ObjectModel> parent = _object(object->path().parent()); if (parent) { assert(object->path().is_child_of(parent->path())); object->set_parent(parent); @@ -97,13 +97,13 @@ ClientStore::add_object(SharedPtr<ObjectModel> object) object->signal_property().emit(p.first, p.second); } -SharedPtr<ObjectModel> +SPtr<ObjectModel> ClientStore::remove_object(const Raul::Path& path) { // Find the object, the "top" of the tree to remove const iterator top = find(path); if (top == end()) { - return SharedPtr<ObjectModel>(); + return SPtr<ObjectModel>(); } // Remove the object and all its descendants @@ -111,7 +111,7 @@ ClientStore::remove_object(const Raul::Path& path) remove(top, removed); // Notify everything that needs to know this object is going away - SharedPtr<ObjectModel> object = PtrCast<ObjectModel>(top->second); + SPtr<ObjectModel> object = dynamic_ptr_cast<ObjectModel>(top->second); if (object) { // Notify the program this object is going away object->signal_destroyed().emit(); @@ -125,43 +125,43 @@ ClientStore::remove_object(const Raul::Path& path) return object; } -SharedPtr<PluginModel> +SPtr<PluginModel> ClientStore::_plugin(const Raul::URI& uri) { Plugins::iterator i = _plugins->find(uri); if (i == _plugins->end()) - return SharedPtr<PluginModel>(); + return SPtr<PluginModel>(); else return (*i).second; } -SharedPtr<const PluginModel> +SPtr<const PluginModel> ClientStore::plugin(const Raul::URI& uri) const { return const_cast<ClientStore*>(this)->_plugin(uri); } -SharedPtr<ObjectModel> +SPtr<ObjectModel> ClientStore::_object(const Raul::Path& path) { const iterator i = find(path); if (i == end()) { - return SharedPtr<ObjectModel>(); + return SPtr<ObjectModel>(); } else { - SharedPtr<ObjectModel> model = PtrCast<ObjectModel>(i->second); + SPtr<ObjectModel> model = dynamic_ptr_cast<ObjectModel>(i->second); assert(model); assert(model->path().is_root() || model->parent()); return model; } } -SharedPtr<const ObjectModel> +SPtr<const ObjectModel> ClientStore::object(const Raul::Path& path) const { return const_cast<ClientStore*>(this)->_object(path); } -SharedPtr<Resource> +SPtr<Resource> ClientStore::_resource(const Raul::URI& uri) { if (Node::uri_is_path(uri)) { @@ -171,16 +171,16 @@ ClientStore::_resource(const Raul::URI& uri) } } -SharedPtr<const Resource> +SPtr<const Resource> ClientStore::resource(const Raul::URI& uri) const { return const_cast<ClientStore*>(this)->_resource(uri); } void -ClientStore::add_plugin(SharedPtr<PluginModel> pm) +ClientStore::add_plugin(SPtr<PluginModel> pm) { - SharedPtr<PluginModel> existing = _plugin(pm->uri()); + SPtr<PluginModel> existing = _plugin(pm->uri()); if (existing) { existing->set(pm); } else { @@ -235,7 +235,7 @@ ClientStore::put(const Raul::URI& uri, if (plugin_type == Plugin::Graph) { is_graph = true; } else if (plugin_type != Plugin::NIL) { - SharedPtr<PluginModel> p( + SPtr<PluginModel> p( new PluginModel(uris(), uri, type_uri, properties)); add_plugin(p); return; @@ -250,7 +250,7 @@ ClientStore::put(const Raul::URI& uri, const Raul::Path path(Node::uri_to_path(uri)); - SharedPtr<ObjectModel> obj = PtrCast<ObjectModel>(_object(path)); + SPtr<ObjectModel> obj = dynamic_ptr_cast<ObjectModel>(_object(path)); if (obj) { obj->set_properties(properties); return; @@ -261,15 +261,15 @@ ClientStore::put(const Raul::URI& uri, } if (is_graph) { - SharedPtr<GraphModel> model(new GraphModel(uris(), path)); + SPtr<GraphModel> model(new GraphModel(uris(), path)); model->set_properties(properties); add_object(model); } else if (is_block) { const Iterator p = properties.find(_uris.ingen_prototype); - SharedPtr<PluginModel> plug; + SPtr<PluginModel> plug; if (p->second.is_valid() && p->second.type() == _uris.forge.URI) { if (!(plug = _plugin(Raul::URI(p->second.get_uri())))) { - plug = SharedPtr<PluginModel>( + plug = SPtr<PluginModel>( new PluginModel(uris(), Raul::URI(p->second.get_uri()), _uris.ingen_nil, @@ -277,7 +277,7 @@ ClientStore::put(const Raul::URI& uri, add_plugin(plug); } - SharedPtr<BlockModel> bm(new BlockModel(uris(), plug, path)); + SPtr<BlockModel> bm(new BlockModel(uris(), plug, path)); bm->set_properties(properties); add_object(bm); } else { @@ -291,7 +291,7 @@ ClientStore::put(const Raul::URI& uri, const Iterator i = properties.find(_uris.lv2_index); if (i != properties.end() && i->second.type() == _uris.forge.Int) { const uint32_t index = i->second.get_int32(); - SharedPtr<PortModel> p( + SPtr<PortModel> p( new PortModel(uris(), path, index, pdir)); p->set_properties(properties); add_object(p); @@ -331,7 +331,7 @@ ClientStore::delta(const Raul::URI& uri, const Raul::Path path(Node::uri_to_path(uri)); - SharedPtr<ObjectModel> obj = _object(path); + SPtr<ObjectModel> obj = _object(path); if (obj) { obj->remove_properties(remove); obj->add_properties(add); @@ -351,7 +351,7 @@ ClientStore::set_property(const Raul::URI& subject_uri, % predicate.c_str() % _uris.forge.str(value)); return; } - SharedPtr<Resource> subject = _resource(subject_uri); + SPtr<Resource> subject = _resource(subject_uri); if (subject) { if (predicate == _uris.ingen_activity) { /* Activity is transient, trigger any live actions (like GUI @@ -361,7 +361,7 @@ ClientStore::set_property(const Raul::URI& subject_uri, subject->set_property(predicate, value); } } else { - SharedPtr<PluginModel> plugin = _plugin(subject_uri); + SPtr<PluginModel> plugin = _plugin(subject_uri); if (plugin) { plugin->set_property(predicate, value); } else if (predicate != _uris.ingen_activity) { @@ -371,23 +371,23 @@ ClientStore::set_property(const Raul::URI& subject_uri, } } -SharedPtr<GraphModel> +SPtr<GraphModel> ClientStore::connection_graph(const Raul::Path& tail_path, const Raul::Path& head_path) { - SharedPtr<GraphModel> graph; + SPtr<GraphModel> graph; if (tail_path.parent() == head_path.parent()) - graph = PtrCast<GraphModel>(_object(tail_path.parent())); + graph = dynamic_ptr_cast<GraphModel>(_object(tail_path.parent())); if (!graph && tail_path.parent() == head_path.parent().parent()) - graph = PtrCast<GraphModel>(_object(tail_path.parent())); + graph = dynamic_ptr_cast<GraphModel>(_object(tail_path.parent())); if (!graph && tail_path.parent().parent() == head_path.parent()) - graph = PtrCast<GraphModel>(_object(head_path.parent())); + graph = dynamic_ptr_cast<GraphModel>(_object(head_path.parent())); if (!graph) - graph = PtrCast<GraphModel>(_object(tail_path.parent().parent())); + graph = dynamic_ptr_cast<GraphModel>(_object(tail_path.parent().parent())); if (!graph) _log.error(Raul::fmt("Unable to find graph for arc %1% => %2%\n") @@ -400,12 +400,12 @@ bool ClientStore::attempt_connection(const Raul::Path& tail_path, const Raul::Path& head_path) { - SharedPtr<PortModel> tail = PtrCast<PortModel>(_object(tail_path)); - SharedPtr<PortModel> head = PtrCast<PortModel>(_object(head_path)); + SPtr<PortModel> tail = dynamic_ptr_cast<PortModel>(_object(tail_path)); + SPtr<PortModel> head = dynamic_ptr_cast<PortModel>(_object(head_path)); if (tail && head) { - SharedPtr<GraphModel> graph = connection_graph(tail_path, head_path); - SharedPtr<ArcModel> arc(new ArcModel(tail, head)); + SPtr<GraphModel> graph = connection_graph(tail_path, head_path); + SPtr<ArcModel> arc(new ArcModel(tail, head)); tail->connected_to(head); head->connected_to(tail); @@ -430,8 +430,8 @@ void ClientStore::disconnect(const Raul::Path& src_path, const Raul::Path& dst_path) { - SharedPtr<PortModel> tail = PtrCast<PortModel>(_object(src_path)); - SharedPtr<PortModel> head = PtrCast<PortModel>(_object(dst_path)); + SPtr<PortModel> tail = dynamic_ptr_cast<PortModel>(_object(src_path)); + SPtr<PortModel> head = dynamic_ptr_cast<PortModel>(_object(dst_path)); if (tail) tail->disconnected_from(head); @@ -439,7 +439,7 @@ ClientStore::disconnect(const Raul::Path& src_path, if (head) head->disconnected_from(tail); - SharedPtr<GraphModel> graph = connection_graph(src_path, dst_path); + SPtr<GraphModel> graph = connection_graph(src_path, dst_path); if (graph) graph->remove_arc(tail.get(), head.get()); } @@ -448,8 +448,8 @@ void ClientStore::disconnect_all(const Raul::Path& parent_graph, const Raul::Path& path) { - SharedPtr<GraphModel> graph = PtrCast<GraphModel>(_object(parent_graph)); - SharedPtr<ObjectModel> object = _object(path); + SPtr<GraphModel> graph = dynamic_ptr_cast<GraphModel>(_object(parent_graph)); + SPtr<ObjectModel> object = _object(path); if (!graph || !object) { _log.error(Raul::fmt("Bad disconnect all notification %1% in %2%\n") @@ -459,7 +459,7 @@ ClientStore::disconnect_all(const Raul::Path& parent_graph, const GraphModel::Arcs arcs = graph->arcs(); for (auto a : arcs) { - SharedPtr<ArcModel> arc = PtrCast<ArcModel>(a.second); + SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(a.second); if (arc->tail()->parent() == object || arc->head()->parent() == object || arc->tail()->path() == path diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp index 98155138..8586f168 100644 --- a/src/client/GraphModel.cpp +++ b/src/client/GraphModel.cpp @@ -28,24 +28,24 @@ namespace Ingen { namespace Client { void -GraphModel::add_child(SharedPtr<ObjectModel> c) +GraphModel::add_child(SPtr<ObjectModel> c) { assert(c->parent().get() == this); - SharedPtr<PortModel> pm = PtrCast<PortModel>(c); + SPtr<PortModel> pm = dynamic_ptr_cast<PortModel>(c); if (pm) { add_port(pm); return; } - SharedPtr<BlockModel> bm = PtrCast<BlockModel>(c); + SPtr<BlockModel> bm = dynamic_ptr_cast<BlockModel>(c); if (bm) { _signal_new_block.emit(bm); } } bool -GraphModel::remove_child(SharedPtr<ObjectModel> o) +GraphModel::remove_child(SPtr<ObjectModel> o) { assert(o->path().is_child_of(path())); assert(o->parent().get() == this); @@ -56,7 +56,7 @@ GraphModel::remove_child(SharedPtr<ObjectModel> o) Arcs::iterator next = j; ++next; - SharedPtr<ArcModel> arc = PtrCast<ArcModel>(j->second); + SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(j->second); if (arc->tail_path().parent() == o->path() || arc->tail_path() == o->path() || arc->head_path().parent() == o->path() @@ -67,11 +67,11 @@ GraphModel::remove_child(SharedPtr<ObjectModel> o) j = next; } - SharedPtr<PortModel> pm = PtrCast<PortModel>(o); + SPtr<PortModel> pm = dynamic_ptr_cast<PortModel>(o); if (pm) remove_port(pm); - SharedPtr<BlockModel> bm = PtrCast<BlockModel>(o); + SPtr<BlockModel> bm = dynamic_ptr_cast<BlockModel>(o); if (bm) { _signal_removed_block.emit(bm); } @@ -90,14 +90,14 @@ GraphModel::clear() assert(_ports.empty()); } -SharedPtr<ArcModel> +SPtr<ArcModel> GraphModel::get_arc(const Node* tail, const Node* head) { Arcs::iterator i = _arcs.find(make_pair(tail, head)); if (i != _arcs.end()) - return PtrCast<ArcModel>(i->second); + return dynamic_ptr_cast<ArcModel>(i->second); else - return SharedPtr<ArcModel>(); + return SPtr<ArcModel>(); } /** Add a connection to this graph. @@ -108,7 +108,7 @@ GraphModel::get_arc(const Node* tail, const Node* head) * this graph is a fatal error. */ void -GraphModel::add_arc(SharedPtr<ArcModel> arc) +GraphModel::add_arc(SPtr<ArcModel> arc) { // Store should have 'resolved' the connection already assert(arc); @@ -122,7 +122,7 @@ GraphModel::add_arc(SharedPtr<ArcModel> arc) assert(arc->head()->parent().get() == this || arc->head()->parent()->parent().get() == this); - SharedPtr<ArcModel> existing = get_arc( + SPtr<ArcModel> existing = get_arc( arc->tail().get(), arc->head().get()); if (existing) { @@ -141,7 +141,7 @@ GraphModel::remove_arc(const Node* tail, const Node* head) { Arcs::iterator i = _arcs.find(make_pair(tail, head)); if (i != _arcs.end()) { - SharedPtr<ArcModel> arc = PtrCast<ArcModel>(i->second); + SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(i->second); _signal_removed_arc.emit(arc); _arcs.erase(i); } diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index 51427f90..9fc22c03 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -73,7 +73,7 @@ ObjectModel::polyphonic() const * @a o as correct. The paths of the two models MUST be equal. */ void -ObjectModel::set(SharedPtr<ObjectModel> o) +ObjectModel::set(SPtr<ObjectModel> o) { assert(_path == o->path()); if (o->_parent) @@ -94,7 +94,7 @@ ObjectModel::set_path(const Raul::Path& p) } void -ObjectModel::set_parent(SharedPtr<ObjectModel> p) +ObjectModel::set_parent(SPtr<ObjectModel> p) { assert(_path.is_child_of(p->path())); _parent = p; diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 5dc6ec2a..206aebab 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -151,7 +151,7 @@ PluginModel::get_property(const Raul::URI& key) const } void -PluginModel::set(SharedPtr<PluginModel> p) +PluginModel::set(SPtr<PluginModel> p) { _type = p->_type; @@ -229,12 +229,12 @@ PluginModel::has_ui() const } -SharedPtr<PluginUI> -PluginModel::ui(Ingen::World* world, - SharedPtr<const BlockModel> block) const +SPtr<PluginUI> +PluginModel::ui(Ingen::World* world, + SPtr<const BlockModel> block) const { if (!_lilv_plugin) { - return SharedPtr<PluginUI>(); + return SPtr<PluginUI>(); } return PluginUI::create(world, block, _lilv_plugin); diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 7a4c88e8..24144b42 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -47,7 +47,7 @@ lv2_ui_write(SuilController controller, return; } - SharedPtr<const PortModel> port = ports[port_index]; + SPtr<const PortModel> port = ports[port_index]; const URIs& uris = ui->world()->uris(); @@ -77,9 +77,9 @@ lv2_ui_write(SuilController controller, } } -PluginUI::PluginUI(Ingen::World* world, - SharedPtr<const BlockModel> block, - const LilvNode* ui_node) +PluginUI::PluginUI(Ingen::World* world, + SPtr<const BlockModel> block, + const LilvNode* ui_node) : _world(world) , _block(block) , _instance(NULL) @@ -93,10 +93,10 @@ PluginUI::~PluginUI() lilv_node_free(_ui_node); } -SharedPtr<PluginUI> -PluginUI::create(Ingen::World* world, - SharedPtr<const BlockModel> block, - const LilvPlugin* plugin) +SPtr<PluginUI> +PluginUI::create(Ingen::World* world, + SPtr<const BlockModel> block, + const LilvPlugin* plugin) { if (!PluginUI::ui_host) { PluginUI::ui_host = suil_host_new(lv2_ui_write, NULL, NULL, NULL); @@ -123,10 +123,10 @@ PluginUI::create(Ingen::World* world, if (!ui) { lilv_node_free(gtk_ui); - return SharedPtr<PluginUI>(); + return SPtr<PluginUI>(); } - SharedPtr<PluginUI> ret(new PluginUI(world, block, lilv_ui_get_uri(ui))); + SPtr<PluginUI> ret(new PluginUI(world, block, lilv_ui_get_uri(ui))); ret->_features = world->lv2_features().lv2_features( world, const_cast<BlockModel*>(block.get())); diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index a4261202..eb645791 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -64,11 +64,11 @@ PortModel::is_uri() const } void -PortModel::set(SharedPtr<ObjectModel> model) +PortModel::set(SPtr<ObjectModel> model) { ObjectModel::set(model); - SharedPtr<PortModel> port = PtrCast<PortModel>(model); + SPtr<PortModel> port = dynamic_ptr_cast<PortModel>(model); if (port) { _index = port->_index; _direction = port->_direction; diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp index 46a14dc1..6f873f14 100644 --- a/src/client/ingen_client.cpp +++ b/src/client/ingen_client.cpp @@ -16,15 +16,13 @@ #include "ingen/Module.hpp" #include "ingen/World.hpp" -#include "raul/SharedPtr.hpp" #include "ingen_config.h" using namespace Ingen; struct IngenClientModule : public Ingen::Module { - void load(Ingen::World* world) { - } + void load(Ingen::World* world) {} }; extern "C" { |