From bdbdf42f3fe990c713c5437724db39274c387eee Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 2 Aug 2020 15:23:19 +0200 Subject: Remove std::shared_ptr alias --- src/client/BlockModel.cpp | 53 ++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'src/client/BlockModel.cpp') diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp index 636b3a85..898a1799 100644 --- a/src/client/BlockModel.cpp +++ b/src/client/BlockModel.cpp @@ -30,15 +30,15 @@ namespace ingen { namespace client { -BlockModel::BlockModel(URIs& uris, - const SPtr& plugin, - const Raul::Path& path) - : ObjectModel(uris, path) - , _plugin_uri(plugin->uri()) - , _plugin(plugin) - , _num_values(0) - , _min_values(nullptr) - , _max_values(nullptr) +BlockModel::BlockModel(URIs& uris, + const std::shared_ptr& plugin, + const Raul::Path& path) + : ObjectModel(uris, path) + , _plugin_uri(plugin->uri()) + , _plugin(plugin) + , _num_values(0) + , _min_values(nullptr) + , _max_values(nullptr) { } @@ -68,7 +68,7 @@ BlockModel::~BlockModel() } void -BlockModel::remove_port(const SPtr& port) +BlockModel::remove_port(const std::shared_ptr& port) { for (auto i = _ports.begin(); i != _ports.end(); ++i) { if ((*i) == port) { @@ -102,7 +102,7 @@ BlockModel::clear() } void -BlockModel::add_child(const SPtr& c) +BlockModel::add_child(const std::shared_ptr& c) { assert(c->parent().get() == this); @@ -114,7 +114,7 @@ BlockModel::add_child(const SPtr& c) } bool -BlockModel::remove_child(const SPtr& c) +BlockModel::remove_child(const std::shared_ptr& c) { assert(c->path().is_child_of(path())); assert(c->parent().get() == this); @@ -130,7 +130,7 @@ BlockModel::remove_child(const SPtr& c) } void -BlockModel::add_port(const SPtr& pm) +BlockModel::add_port(const std::shared_ptr& pm) { assert(pm); assert(pm->path().is_child_of(path())); @@ -143,7 +143,7 @@ BlockModel::add_port(const SPtr& pm) _signal_new_port.emit(pm); } -SPtr +std::shared_ptr BlockModel::get_port(const Raul::Symbol& symbol) const { for (auto p : _ports) { @@ -151,10 +151,10 @@ BlockModel::get_port(const Raul::Symbol& symbol) const return p; } } - return SPtr(); + return std::shared_ptr(); } -SPtr +std::shared_ptr BlockModel::get_port(uint32_t index) const { return _ports[index]; @@ -169,10 +169,11 @@ BlockModel::port(uint32_t index) const } void -BlockModel::default_port_value_range(const SPtr& port, - float& min, - float& max, - uint32_t srate) const +BlockModel::default_port_value_range( + const std::shared_ptr& port, + float& min, + float& max, + uint32_t srate) const { // Default control values min = 0.0; @@ -203,10 +204,10 @@ BlockModel::default_port_value_range(const SPtr& port, } void -BlockModel::port_value_range(const SPtr& port, - float& min, - float& max, - uint32_t srate) const +BlockModel::port_value_range(const std::shared_ptr& port, + float& min, + float& max, + uint32_t srate) const { assert(port->parent().get() == this); @@ -246,7 +247,7 @@ BlockModel::label() const } std::string -BlockModel::port_label(const SPtr& port) const +BlockModel::port_label(const std::shared_ptr& port) const { const Atom& name = port->get_property(URI(LV2_CORE__name)); if (name.is_valid() && name.type() == _uris.forge.String) { @@ -273,7 +274,7 @@ BlockModel::port_label(const SPtr& port) const } void -BlockModel::set(const SPtr& model) +BlockModel::set(const std::shared_ptr& model) { auto block = std::dynamic_pointer_cast(model); if (block) { -- cgit v1.2.1