summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/BlockModel.cpp34
-rw-r--r--src/client/GraphModel.cpp8
-rw-r--r--src/client/ObjectModel.cpp4
-rw-r--r--src/client/PortModel.cpp2
4 files changed, 24 insertions, 24 deletions
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp
index 4cee9ac0..f9eaa26e 100644
--- a/src/client/BlockModel.cpp
+++ b/src/client/BlockModel.cpp
@@ -29,9 +29,9 @@
namespace ingen {
namespace client {
-BlockModel::BlockModel(URIs& uris,
- SPtr<PluginModel> plugin,
- const Raul::Path& path)
+BlockModel::BlockModel(URIs& uris,
+ const SPtr<PluginModel>& plugin,
+ const Raul::Path& path)
: ObjectModel(uris, path)
, _plugin_uri(plugin->uri())
, _plugin(plugin)
@@ -69,7 +69,7 @@ BlockModel::~BlockModel()
}
void
-BlockModel::remove_port(SPtr<PortModel> port)
+BlockModel::remove_port(const SPtr<PortModel>& port)
{
for (auto i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i) == port) {
@@ -103,7 +103,7 @@ BlockModel::clear()
}
void
-BlockModel::add_child(SPtr<ObjectModel> c)
+BlockModel::add_child(const SPtr<ObjectModel>& c)
{
assert(c->parent().get() == this);
@@ -115,7 +115,7 @@ BlockModel::add_child(SPtr<ObjectModel> c)
}
bool
-BlockModel::remove_child(SPtr<ObjectModel> c)
+BlockModel::remove_child(const SPtr<ObjectModel>& c)
{
assert(c->path().is_child_of(path()));
assert(c->parent().get() == this);
@@ -131,7 +131,7 @@ BlockModel::remove_child(SPtr<ObjectModel> c)
}
void
-BlockModel::add_port(SPtr<PortModel> pm)
+BlockModel::add_port(const SPtr<PortModel>& pm)
{
assert(pm);
assert(pm->path().is_child_of(path()));
@@ -170,10 +170,10 @@ BlockModel::port(uint32_t index) const
}
void
-BlockModel::default_port_value_range(SPtr<const PortModel> port,
- float& min,
- float& max,
- uint32_t srate) const
+BlockModel::default_port_value_range(const SPtr<const PortModel>& port,
+ float& min,
+ float& max,
+ uint32_t srate) const
{
// Default control values
min = 0.0;
@@ -204,10 +204,10 @@ BlockModel::default_port_value_range(SPtr<const PortModel> port,
}
void
-BlockModel::port_value_range(SPtr<const PortModel> port,
- float& min,
- float& max,
- uint32_t srate) const
+BlockModel::port_value_range(const SPtr<const PortModel>& port,
+ float& min,
+ float& max,
+ uint32_t srate) const
{
assert(port->parent().get() == this);
@@ -247,7 +247,7 @@ BlockModel::label() const
}
std::string
-BlockModel::port_label(SPtr<const PortModel> port) const
+BlockModel::port_label(const SPtr<const PortModel>& port) const
{
const Atom& name = port->get_property(URI(LV2_CORE__name));
if (name.is_valid() && name.type() == _uris.forge.String) {
@@ -274,7 +274,7 @@ BlockModel::port_label(SPtr<const PortModel> port) const
}
void
-BlockModel::set(SPtr<ObjectModel> model)
+BlockModel::set(const SPtr<ObjectModel>& model)
{
SPtr<BlockModel> block = dynamic_ptr_cast<BlockModel>(model);
if (block) {
diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp
index 8999ace8..90ab2964 100644
--- a/src/client/GraphModel.cpp
+++ b/src/client/GraphModel.cpp
@@ -29,7 +29,7 @@ namespace ingen {
namespace client {
void
-GraphModel::add_child(SPtr<ObjectModel> c)
+GraphModel::add_child(const SPtr<ObjectModel>& c)
{
assert(c->parent().get() == this);
@@ -46,7 +46,7 @@ GraphModel::add_child(SPtr<ObjectModel> c)
}
bool
-GraphModel::remove_child(SPtr<ObjectModel> o)
+GraphModel::remove_child(const SPtr<ObjectModel>& o)
{
assert(o->path().is_child_of(path()));
assert(o->parent().get() == this);
@@ -66,7 +66,7 @@ GraphModel::remove_child(SPtr<ObjectModel> o)
}
void
-GraphModel::remove_arcs_on(SPtr<PortModel> p)
+GraphModel::remove_arcs_on(const SPtr<PortModel>& p)
{
// Remove any connections which referred to this object,
// since they can't possibly exist anymore
@@ -116,7 +116,7 @@ GraphModel::get_arc(const Node* tail, const Node* head)
* this graph is a fatal error.
*/
void
-GraphModel::add_arc(SPtr<ArcModel> arc)
+GraphModel::add_arc(const SPtr<ArcModel>& arc)
{
// Store should have 'resolved' the connection already
assert(arc);
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index ff7ab88b..b1a27590 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -81,7 +81,7 @@ ObjectModel::polyphonic() const
* `o` as correct. The paths of the two models MUST be equal.
*/
void
-ObjectModel::set(SPtr<ObjectModel> o)
+ObjectModel::set(const SPtr<ObjectModel>& o)
{
assert(_path == o->path());
if (o->_parent) {
@@ -104,7 +104,7 @@ ObjectModel::set_path(const Raul::Path& p)
}
void
-ObjectModel::set_parent(SPtr<ObjectModel> p)
+ObjectModel::set_parent(const SPtr<ObjectModel>& p)
{
assert(_path.is_child_of(p->path()));
_parent = p;
diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp
index 79a3527a..6b2d011f 100644
--- a/src/client/PortModel.cpp
+++ b/src/client/PortModel.cpp
@@ -65,7 +65,7 @@ PortModel::is_uri() const
}
void
-PortModel::set(SPtr<ObjectModel> model)
+PortModel::set(const SPtr<ObjectModel>& model)
{
ObjectModel::set(model);