diff options
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r-- | src/gui/Port.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 643cca5f..3da9cf46 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -125,8 +125,8 @@ Port::port_label(App& app, SPtr<const PortModel> pm) if (name.type() == app.forge().String) { label = name.ptr<char>(); } else { - const SPtr<const BlockModel> parent( - std::dynamic_pointer_cast<const BlockModel>(pm->parent())); + const auto parent = + std::dynamic_pointer_cast<const BlockModel>(pm->parent()); if (parent && parent->plugin_model()) { label = parent->plugin_model()->port_human_name(pm->index()); } @@ -151,7 +151,7 @@ Port::update_metadata() { SPtr<const PortModel> pm = _port_model.lock(); if (pm && _app.can_control(pm.get()) && pm->is_numeric()) { - SPtr<const BlockModel> parent = std::dynamic_pointer_cast<const BlockModel>(pm->parent()); + auto parent = std::dynamic_pointer_cast<const BlockModel>(pm->parent()); if (parent) { float min = 0.0f; float max = 1.0f; @@ -231,8 +231,8 @@ Port::on_scale_point_activated(float f) Gtk::Menu* Port::build_enum_menu() { - SPtr<const BlockModel> block = std::dynamic_pointer_cast<BlockModel>(model()->parent()); - Gtk::Menu* menu = Gtk::manage(new Gtk::Menu()); + auto block = std::dynamic_pointer_cast<BlockModel>(model()->parent()); + Gtk::Menu* menu = Gtk::manage(new Gtk::Menu()); PluginModel::ScalePoints points = block->plugin_model()->port_scale_points( model()->index()); @@ -259,9 +259,9 @@ Port::on_uri_activated(const URI& uri) Gtk::Menu* Port::build_uri_menu() { - World& world = _app.world(); - SPtr<const BlockModel> block = std::dynamic_pointer_cast<BlockModel>(model()->parent()); - Gtk::Menu* menu = Gtk::manage(new Gtk::Menu()); + World& world = _app.world(); + auto block = std::dynamic_pointer_cast<BlockModel>(model()->parent()); + Gtk::Menu* menu = Gtk::manage(new Gtk::Menu()); // Get the port designation, which should be a rdf:Property const Atom& designation_atom = model()->get_property( @@ -374,8 +374,8 @@ Port::activity(const Atom& value) GraphBox* Port::get_graph_box() const { - SPtr<const GraphModel> graph = std::dynamic_pointer_cast<const GraphModel>(model()->parent()); - GraphBox* box = _app.window_factory()->graph_box(graph); + auto graph = std::dynamic_pointer_cast<const GraphModel>(model()->parent()); + GraphBox* box = _app.window_factory()->graph_box(graph); if (!box) { graph = std::dynamic_pointer_cast<const GraphModel>(model()->parent()->parent()); box = _app.window_factory()->graph_box(graph); @@ -515,7 +515,7 @@ Port::on_selected(gboolean b) if (b) { SPtr<const PortModel> pm = _port_model.lock(); if (pm) { - SPtr<const BlockModel> block = + auto block = std::dynamic_pointer_cast<const BlockModel>(pm->parent()); GraphWindow* win = _app.window_factory()->parent_graph_window(block); |