summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--ingen/Interface.hpp2
-rw-r--r--ingen/Log.hpp2
-rw-r--r--ingen/Tee.hpp2
-rw-r--r--ingen/World.hpp7
-rw-r--r--ingen/client/ClientStore.hpp12
-rw-r--r--ingen/client/PluginModel.hpp6
-rw-r--r--ingen/client/PluginUI.hpp6
-rw-r--r--ingen/client/SocketClient.hpp22
-rw-r--r--src/client/ClientStore.cpp10
-rw-r--r--src/client/PluginModel.cpp5
-rw-r--r--src/client/PluginUI.cpp6
-rw-r--r--src/gui/App.cpp2
-rw-r--r--src/gui/App.hpp2
-rw-r--r--src/gui/Arc.cpp11
-rw-r--r--src/gui/Arc.hpp8
-rw-r--r--src/gui/BreadCrumbs.cpp5
-rw-r--r--src/gui/BreadCrumbs.hpp15
-rw-r--r--src/gui/ConnectWindow.cpp2
-rw-r--r--src/gui/ConnectWindow.hpp2
-rw-r--r--src/gui/GraphBox.cpp13
-rw-r--r--src/gui/GraphBox.hpp15
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/GraphCanvas.hpp2
-rw-r--r--src/gui/LoadPluginWindow.cpp24
-rw-r--r--src/gui/LoadPluginWindow.hpp21
-rw-r--r--src/server/Event.hpp19
-rw-r--r--src/server/EventWriter.hpp2
-rw-r--r--src/server/PortImpl.hpp6
-rw-r--r--src/server/SocketServer.hpp6
30 files changed, 120 insertions, 118 deletions
diff --git a/.clang-tidy b/.clang-tidy
index badd2fd1..f3b3a33f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -67,7 +67,6 @@ Checks: >
-modernize-use-default-member-init,
-modernize-use-trailing-return-type,
-modernize-use-using,
- -performance-unnecessary-value-param,
-portability-simd-intrinsics,
-readability-avoid-const-params-in-decls,
-readability-const-return-type,
diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp
index 981b7dd5..10d7d4bf 100644
--- a/ingen/Interface.hpp
+++ b/ingen/Interface.hpp
@@ -57,7 +57,7 @@ public:
virtual SPtr<Interface> respondee() const { return SPtr<Interface>(); }
- virtual void set_respondee(SPtr<Interface> respondee) {}
+ virtual void set_respondee(const SPtr<Interface>& respondee) {}
virtual void message(const Message& msg) = 0;
diff --git a/ingen/Log.hpp b/ingen/Log.hpp
index e6bc2b39..d668e873 100644
--- a/ingen/Log.hpp
+++ b/ingen/Log.hpp
@@ -90,7 +90,7 @@ public:
void set_flush(bool f) { _flush = f; }
void set_trace(bool f) { _trace = f; }
- void set_sink(Sink s) { _sink = s; }
+ void set_sink(Sink s) { _sink = std::move(s); }
private:
void print(FILE* stream, const std::string& msg) const;
diff --git a/ingen/Tee.hpp b/ingen/Tee.hpp
index bf3fd335..b13b9e95 100644
--- a/ingen/Tee.hpp
+++ b/ingen/Tee.hpp
@@ -40,7 +40,7 @@ public:
return _sinks.front()->respondee();
}
- void set_respondee(SPtr<Interface> respondee) override {
+ void set_respondee(const SPtr<Interface>& respondee) override {
_sinks.front()->set_respondee(respondee);
}
diff --git a/ingen/World.hpp b/ingen/World.hpp
index a2906525..b5fc7350 100644
--- a/ingen/World.hpp
+++ b/ingen/World.hpp
@@ -89,9 +89,10 @@ public:
virtual bool run_module(const char* name);
/** A function to create a new remote Interface. */
- typedef SPtr<Interface> (*InterfaceFactory)(World& world,
- const URI& engine_uri,
- SPtr<Interface> respondee);
+ typedef SPtr<Interface> (*InterfaceFactory)(
+ World& world,
+ const URI& engine_uri,
+ const SPtr<Interface>& respondee);
/** Register an InterfaceFactory (for module implementations). */
virtual void add_interface_factory(const std::string& scheme,
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp
index 9576cd3c..109bd835 100644
--- a/ingen/client/ClientStore.hpp
+++ b/ingen/client/ClientStore.hpp
@@ -59,9 +59,9 @@ class INGEN_API ClientStore : public Store
, public INGEN_TRACKABLE {
public:
ClientStore(
- URIs& uris,
- Log& log,
- SPtr<SigClientInterface> emitter = SPtr<SigClientInterface>());
+ URIs& uris,
+ Log& log,
+ const SPtr<SigClientInterface>& emitter = SPtr<SigClientInterface>());
URI uri() const override { return URI("ingen:/clients/store"); }
@@ -75,7 +75,7 @@ public:
SPtr<const Plugins> plugins() const { return _plugins; }
SPtr<Plugins> plugins() { return _plugins; }
- void set_plugins(SPtr<Plugins> p) { _plugins = p; }
+ void set_plugins(SPtr<Plugins> p) { _plugins = std::move(p); }
URIs& uris() { return _uris; }
@@ -108,10 +108,10 @@ private:
SPtr<PluginModel> _plugin(const Atom& uri);
SPtr<Resource> _resource(const URI& uri);
- void add_object(SPtr<ObjectModel> object);
+ void add_object(const SPtr<ObjectModel>& object);
SPtr<ObjectModel> remove_object(const Raul::Path& path);
- void add_plugin(SPtr<PluginModel> pm);
+ void add_plugin(const SPtr<PluginModel>& pm);
SPtr<GraphModel> connection_graph(const Raul::Path& tail_path,
const Raul::Path& head_path);
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index dc0c724f..10ab3a6a 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -82,8 +82,8 @@ public:
bool has_ui() const;
- SPtr<PluginUI> ui(ingen::World& world,
- SPtr<const BlockModel> block) const;
+ SPtr<PluginUI>
+ ui(ingen::World& world, const SPtr<const BlockModel>& block) const;
std::string documentation(bool html) const;
std::string port_documentation(uint32_t index, bool html) const;
@@ -104,7 +104,7 @@ public:
protected:
friend class ClientStore;
- void set(SPtr<PluginModel> p);
+ void set(const SPtr<PluginModel>& p);
void add_preset(const URI& uri, const std::string& label);
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp
index b5d467ea..70ff7274 100644
--- a/ingen/client/PluginUI.hpp
+++ b/ingen/client/PluginUI.hpp
@@ -53,9 +53,9 @@ public:
* connected first. The caller should connect to signal_property_changed,
* then call instantiate().
*/
- static SPtr<PluginUI> create(ingen::World& world,
- SPtr<const BlockModel> block,
- const LilvPlugin* plugin);
+ static SPtr<PluginUI> create(ingen::World& world,
+ const SPtr<const BlockModel>& block,
+ const LilvPlugin* plugin);
/** Instantiate the UI.
*
diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp
index 092ef9d2..8e551821 100644
--- a/ingen/client/SocketClient.hpp
+++ b/ingen/client/SocketClient.hpp
@@ -29,27 +29,27 @@ namespace client {
class INGEN_API SocketClient : public SocketWriter
{
public:
- SocketClient(World& world,
- const URI& uri,
- SPtr<Raul::Socket> sock,
- SPtr<Interface> respondee)
- : SocketWriter(world.uri_map(), world.uris(), uri, sock)
- , _respondee(respondee)
- , _reader(world, *respondee.get(), sock)
+ SocketClient(World& world,
+ const URI& uri,
+ const SPtr<Raul::Socket>& sock,
+ const SPtr<Interface>& respondee)
+ : SocketWriter(world.uri_map(), world.uris(), uri, sock)
+ , _respondee(respondee)
+ , _reader(world, *respondee.get(), sock)
{}
SPtr<Interface> respondee() const override {
return _respondee;
}
- void set_respondee(SPtr<Interface> respondee) override {
+ void set_respondee(const SPtr<Interface>& respondee) override {
_respondee = respondee;
}
static SPtr<ingen::Interface>
- new_socket_interface(ingen::World& world,
- const URI& uri,
- SPtr<ingen::Interface> respondee)
+ new_socket_interface(ingen::World& world,
+ const URI& uri,
+ const SPtr<ingen::Interface>& respondee)
{
const Raul::Socket::Type type = (uri.scheme() == "unix"
? Raul::Socket::Type::UNIX
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index e494e874..a0c30c85 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -35,9 +35,9 @@
namespace ingen {
namespace client {
-ClientStore::ClientStore(URIs& uris,
- Log& log,
- SPtr<SigClientInterface> emitter)
+ClientStore::ClientStore(URIs& uris,
+ Log& log,
+ const SPtr<SigClientInterface>& emitter)
: _uris(uris)
, _log(log)
, _emitter(emitter)
@@ -57,7 +57,7 @@ ClientStore::clear()
}
void
-ClientStore::add_object(SPtr<ObjectModel> object)
+ClientStore::add_object(const SPtr<ObjectModel>& object)
{
// If we already have "this" object, merge the existing one into the new
// one (with precedence to the new values).
@@ -189,7 +189,7 @@ ClientStore::resource(const URI& uri) const
}
void
-ClientStore::add_plugin(SPtr<PluginModel> pm)
+ClientStore::add_plugin(const SPtr<PluginModel>& pm)
{
SPtr<PluginModel> existing = _plugin(pm->uri());
if (existing) {
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 6c6b9748..92a1b295 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -153,7 +153,7 @@ PluginModel::get_property(const URI& key) const
}
void
-PluginModel::set(SPtr<PluginModel> p)
+PluginModel::set(const SPtr<PluginModel>& p)
{
_type = p->_type;
@@ -242,8 +242,7 @@ PluginModel::has_ui() const
}
SPtr<PluginUI>
-PluginModel::ui(ingen::World& world,
- SPtr<const BlockModel> block) const
+PluginModel::ui(ingen::World& world, const SPtr<const BlockModel>& block) const
{
if (!_lilv_plugin) {
return SPtr<PluginUI>();
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index bc58020a..6fdf76c5 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -178,9 +178,9 @@ PluginUI::~PluginUI()
}
SPtr<PluginUI>
-PluginUI::create(ingen::World& world,
- SPtr<const BlockModel> block,
- const LilvPlugin* plugin)
+PluginUI::create(ingen::World& world,
+ const SPtr<const BlockModel>& block,
+ const LilvPlugin* plugin)
{
if (!PluginUI::ui_host) {
PluginUI::ui_host = suil_host_new(lv2_ui_write,
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 92279906..fa48cb18 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -160,7 +160,7 @@ App::run()
}
void
-App::attach(SPtr<ingen::Interface> client)
+App::attach(const SPtr<ingen::Interface>& client)
{
assert(!_client);
assert(!_store);
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index e9d83cfd..3149f169 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -75,7 +75,7 @@ public:
void error_message(const std::string& str);
- void attach(SPtr<ingen::Interface> client);
+ void attach(const SPtr<ingen::Interface>& client);
void detach();
diff --git a/src/gui/Arc.cpp b/src/gui/Arc.cpp
index d811bd22..b436dd26 100644
--- a/src/gui/Arc.cpp
+++ b/src/gui/Arc.cpp
@@ -24,12 +24,11 @@
namespace ingen {
namespace gui {
-Arc::Arc(Ganv::Canvas& canvas,
- SPtr<const client::ArcModel> model,
- Ganv::Node* src,
- Ganv::Node* dst)
- : Ganv::Edge(canvas, src, dst)
- , _arc_model(model)
+Arc::Arc(Ganv::Canvas& canvas,
+ const SPtr<const client::ArcModel>& model,
+ Ganv::Node* src,
+ Ganv::Node* dst)
+ : Ganv::Edge(canvas, src, dst), _arc_model(model)
{
SPtr<const client::ObjectModel> tparent = model->tail()->parent();
SPtr<const client::BlockModel> tparent_block;
diff --git a/src/gui/Arc.hpp b/src/gui/Arc.hpp
index 453985fc..7e33384b 100644
--- a/src/gui/Arc.hpp
+++ b/src/gui/Arc.hpp
@@ -35,10 +35,10 @@ namespace gui {
class Arc : public Ganv::Edge
{
public:
- Arc(Ganv::Canvas& canvas,
- SPtr<const client::ArcModel> model,
- Ganv::Node* src,
- Ganv::Node* dst);
+ Arc(Ganv::Canvas& canvas,
+ const SPtr<const client::ArcModel>& model,
+ Ganv::Node* src,
+ Ganv::Node* dst);
SPtr<const client::ArcModel> model() const { return _arc_model; }
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index a4a1b2fb..5dbdab17 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -58,7 +58,7 @@ BreadCrumbs::view(const Raul::Path& path)
* children preserved.
*/
void
-BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view)
+BreadCrumbs::build(const Raul::Path& path, const SPtr<GraphView>& view)
{
bool old_enable_signal = _enable_signal;
_enable_signal = false;
@@ -156,8 +156,7 @@ BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view)
* match, otherwise ignoring `view`.
*/
BreadCrumbs::BreadCrumb*
-BreadCrumbs::create_crumb(const Raul::Path& path,
- SPtr<GraphView> view)
+BreadCrumbs::create_crumb(const Raul::Path& path, const SPtr<GraphView>& view)
{
BreadCrumb* but = manage(
new BreadCrumb(path,
diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp
index 63872a78..f359b971 100644
--- a/src/gui/BreadCrumbs.hpp
+++ b/src/gui/BreadCrumbs.hpp
@@ -47,7 +47,7 @@ public:
SPtr<GraphView> view(const Raul::Path& path);
- void build(Raul::Path path, SPtr<GraphView> view);
+ void build(const Raul::Path& path, const SPtr<GraphView>& view);
sigc::signal<void, const Raul::Path&, SPtr<GraphView> > signal_graph_selected;
@@ -64,9 +64,10 @@ private:
class BreadCrumb : public Gtk::ToggleButton
{
public:
- BreadCrumb(const Raul::Path& path, SPtr<GraphView> view = SPtr<GraphView>())
- : _path(path)
- , _view(view)
+ BreadCrumb(const Raul::Path& path,
+ const SPtr<GraphView>& view = SPtr<GraphView>())
+ : _path(path)
+ , _view(view)
{
assert(!view || view->graph()->path() == path);
set_border_width(0);
@@ -75,7 +76,7 @@ private:
show_all();
}
- void set_view(SPtr<GraphView> view) {
+ void set_view(const SPtr<GraphView>& view) {
assert(!view || view->graph()->path() == _path);
_view = view;
}
@@ -100,8 +101,8 @@ private:
SPtr<GraphView> _view;
};
- BreadCrumb* create_crumb(const Raul::Path& path,
- SPtr<GraphView> view = SPtr<GraphView>());
+ BreadCrumb* create_crumb(const Raul::Path& path,
+ const SPtr<GraphView>& view = SPtr<GraphView>());
void breadcrumb_clicked(BreadCrumb* crumb);
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 209475e0..fc9e7cab 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -129,7 +129,7 @@ ConnectWindow::ingen_response(int32_t id,
}
void
-ConnectWindow::set_connected_to(SPtr<ingen::Interface> engine)
+ConnectWindow::set_connected_to(const SPtr<ingen::Interface>& engine)
{
_app->world().set_interface(engine);
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 882e0142..481e4d83 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -57,7 +57,7 @@ public:
ConnectWindow(BaseObjectType* cobject,
Glib::RefPtr<Gtk::Builder> xml);
- void set_connected_to(SPtr<ingen::Interface> engine);
+ void set_connected_to(const SPtr<ingen::Interface>& engine);
void start(App& app, ingen::World& world);
bool attached() const { return _finished_connecting; }
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp
index 7fe1a643..7856932d 100644
--- a/src/gui/GraphBox.cpp
+++ b/src/gui/GraphBox.cpp
@@ -195,7 +195,7 @@ GraphBox::~GraphBox()
}
SPtr<GraphBox>
-GraphBox::create(App& app, SPtr<const GraphModel> graph)
+GraphBox::create(App& app, const SPtr<const GraphModel>& graph)
{
GraphBox* result = nullptr;
Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("graph_win");
@@ -248,7 +248,8 @@ GraphBox::set_status_text(const std::string& text)
}
void
-GraphBox::set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view)
+GraphBox::set_graph_from_path(const Raul::Path& path,
+ const SPtr<GraphView>& view)
{
if (view) {
assert(view->graph()->path() == path);
@@ -267,8 +268,8 @@ GraphBox::set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view)
* If `view` is null, a new view will be created.
*/
void
-GraphBox::set_graph(SPtr<const GraphModel> graph,
- SPtr<GraphView> view)
+GraphBox::set_graph(const SPtr<const GraphModel>& graph,
+ const SPtr<GraphView>& view)
{
if (!graph || graph == _graph) {
return;
@@ -355,7 +356,7 @@ GraphBox::set_graph(SPtr<const GraphModel> graph,
}
void
-GraphBox::graph_port_added(SPtr<const PortModel> port)
+GraphBox::graph_port_added(const SPtr<const PortModel>& port)
{
if (port->is_input() && _app->can_control(port.get())) {
_menu_view_control_window->property_sensitive() = true;
@@ -363,7 +364,7 @@ GraphBox::graph_port_added(SPtr<const PortModel> port)
}
void
-GraphBox::graph_port_removed(SPtr<const PortModel> port)
+GraphBox::graph_port_removed(const SPtr<const PortModel>& port)
{
if (!(port->is_input() && _app->can_control(port.get()))) {
return;
diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp
index 93599e0b..e1f602b7 100644
--- a/src/gui/GraphBox.hpp
+++ b/src/gui/GraphBox.hpp
@@ -70,15 +70,15 @@ public:
const Glib::RefPtr<Gtk::Builder>& xml);
~GraphBox();
- static SPtr<GraphBox> create(
- App& app, SPtr<const client::GraphModel> graph);
+ static SPtr<GraphBox>
+ create(App& app, const SPtr<const client::GraphModel>& graph);
void init_box(App& app);
void set_status_text(const std::string& text);
- void set_graph(SPtr<const client::GraphModel> graph,
- SPtr<GraphView> view);
+ void set_graph(const SPtr<const client::GraphModel>& graph,
+ const SPtr<GraphView>& view);
void set_window(GraphWindow* win) { _window = win; }
@@ -91,14 +91,15 @@ public:
void show_port_status(const client::PortModel* port,
const Atom& value);
- void set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view);
+ void
+ set_graph_from_path(const Raul::Path& path, const SPtr<GraphView>& view);
void object_entered(const client::ObjectModel* model);
void object_left(const client::ObjectModel* model);
private:
- void graph_port_added(SPtr<const client::PortModel> port);
- void graph_port_removed(SPtr<const client::PortModel> port);
+ void graph_port_added(const SPtr<const client::PortModel>& port);
+ void graph_port_removed(const SPtr<const client::PortModel>& port);
void property_changed(const URI& predicate, const Atom& value);
void show_status(const client::ObjectModel* model);
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index b89a2ddb..bb60caa5 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -841,7 +841,7 @@ GraphCanvas::menu_add_port(const string& sym_base,
}
void
-GraphCanvas::load_plugin(WPtr<PluginModel> weak_plugin)
+GraphCanvas::load_plugin(const WPtr<PluginModel>& weak_plugin)
{
SPtr<PluginModel> plugin = weak_plugin.lock();
if (!plugin) {
diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp
index b2529845..5b379ec7 100644
--- a/src/gui/GraphCanvas.hpp
+++ b/src/gui/GraphCanvas.hpp
@@ -96,7 +96,7 @@ private:
void menu_new_graph();
void menu_load_graph();
void menu_properties();
- void load_plugin(WPtr<client::PluginModel> weak_plugin);
+ void load_plugin(const WPtr<client::PluginModel>& weak_plugin);
void build_menus();
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 870288ac..acc34842 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -125,8 +125,8 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject,
}
void
-LoadPluginWindow::present(SPtr<const GraphModel> graph,
- Properties data)
+LoadPluginWindow::present(const SPtr<const GraphModel>& graph,
+ const Properties& data)
{
set_graph(graph);
_initial_data = data;
@@ -164,7 +164,7 @@ LoadPluginWindow::name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton*
* This function MUST be called before using the window in any way!
*/
void
-LoadPluginWindow::set_graph(SPtr<const GraphModel> graph)
+LoadPluginWindow::set_graph(const SPtr<const GraphModel>& graph)
{
if (_graph) {
_graph = graph;
@@ -199,7 +199,7 @@ LoadPluginWindow::on_show()
}
void
-LoadPluginWindow::set_plugins(SPtr<const ClientStore::Plugins> plugins)
+LoadPluginWindow::set_plugins(const SPtr<const ClientStore::Plugins>& plugins)
{
_rows.clear();
_plugins_liststore->clear();
@@ -213,7 +213,7 @@ LoadPluginWindow::set_plugins(SPtr<const ClientStore::Plugins> plugins)
}
void
-LoadPluginWindow::new_plugin(SPtr<const PluginModel> pm)
+LoadPluginWindow::new_plugin(const SPtr<const PluginModel>& pm)
{
if (is_visible()) {
add_plugin(pm);
@@ -223,7 +223,7 @@ LoadPluginWindow::new_plugin(SPtr<const PluginModel> pm)
}
static std::string
-get_project_name(SPtr<const PluginModel> plugin)
+get_project_name(const SPtr<const PluginModel>& plugin)
{
std::string name;
if (plugin->lilv_plugin()) {
@@ -249,7 +249,7 @@ get_project_name(SPtr<const PluginModel> plugin)
}
static std::string
-get_author_name(SPtr<const PluginModel> plugin)
+get_author_name(const SPtr<const PluginModel>& plugin)
{
std::string name;
if (plugin->lilv_plugin()) {
@@ -263,8 +263,8 @@ get_author_name(SPtr<const PluginModel> plugin)
}
void
-LoadPluginWindow::set_row(Gtk::TreeModel::Row& row,
- SPtr<const PluginModel> plugin)
+LoadPluginWindow::set_row(Gtk::TreeModel::Row& row,
+ const SPtr<const PluginModel>& plugin)
{
const URIs& uris = _app->uris();
const Atom& name = plugin->get_property(uris.doap_name);
@@ -294,7 +294,7 @@ LoadPluginWindow::set_row(Gtk::TreeModel::Row& row,
}
void
-LoadPluginWindow::add_plugin(SPtr<const PluginModel> plugin)
+LoadPluginWindow::add_plugin(const SPtr<const PluginModel>& plugin)
{
if (plugin->lilv_plugin() && lilv_plugin_is_replaced(plugin->lilv_plugin())) {
return;
@@ -357,8 +357,8 @@ LoadPluginWindow::plugin_selection_changed()
* sends the notification back.
*/
string
-LoadPluginWindow::generate_module_name(SPtr<const PluginModel> plugin,
- int offset)
+LoadPluginWindow::generate_module_name(const SPtr<const PluginModel>& plugin,
+ int offset)
{
std::stringstream ss;
ss << plugin->default_block_symbol();
diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp
index 49c61c76..78c52eba 100644
--- a/src/gui/LoadPluginWindow.hpp
+++ b/src/gui/LoadPluginWindow.hpp
@@ -54,13 +54,14 @@ public:
LoadPluginWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml);
- void set_graph(SPtr<const client::GraphModel> graph);
- void set_plugins(SPtr<const client::ClientStore::Plugins> plugins);
+ void set_graph(const SPtr<const client::GraphModel>& graph);
- void add_plugin(SPtr<const client::PluginModel> plugin);
+ void set_plugins(const SPtr<const client::ClientStore::Plugins>& plugins);
- void present(SPtr<const client::GraphModel> graph,
- Properties data);
+ void add_plugin(const SPtr<const client::PluginModel>& plugin);
+
+ void present(const SPtr<const client::GraphModel>& graph,
+ const Properties& data);
protected:
void on_show() override;
@@ -109,10 +110,10 @@ private:
void name_changed();
void name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* event);
- void set_row(Gtk::TreeModel::Row& row,
- SPtr<const client::PluginModel> plugin);
+ void set_row(Gtk::TreeModel::Row& row,
+ const SPtr<const client::PluginModel>& plugin);
- void new_plugin(SPtr<const client::PluginModel> pm);
+ void new_plugin(const SPtr<const client::PluginModel>& pm);
void plugin_property_changed(const URI& plugin,
const URI& predicate,
@@ -122,8 +123,8 @@ private:
void plugin_selection_changed();
static std::string
- generate_module_name(SPtr<const client::PluginModel> plugin,
- int offset = 0);
+ generate_module_name(const SPtr<const client::PluginModel>& plugin,
+ int offset = 0);
void load_plugin(const Gtk::TreeModel::iterator& iter);
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index 9c284e49..a8d6979b 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -107,17 +107,14 @@ public:
inline Engine& engine() { return _engine; }
protected:
- Event(Engine& engine,
- const SPtr<Interface>& client,
- int32_t id,
- FrameTime time)
- : _engine(engine)
- , _next(nullptr)
- , _request_client(std::move(client))
- , _request_id(id)
- , _time(time)
- , _status(Status::NOT_PREPARED)
- , _mode(Mode::NORMAL)
+ Event(Engine& engine, SPtr<Interface> client, int32_t id, FrameTime time)
+ : _engine(engine)
+ , _next(nullptr)
+ , _request_client(std::move(client))
+ , _request_id(id)
+ , _time(time)
+ , _status(Status::NOT_PREPARED)
+ , _mode(Mode::NORMAL)
{}
/** Constructor for internal events only */
diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp
index 85aa6f70..f0499f10 100644
--- a/src/server/EventWriter.hpp
+++ b/src/server/EventWriter.hpp
@@ -43,7 +43,7 @@ public:
return _respondee;
}
- void set_respondee(SPtr<Interface> respondee) override {
+ void set_respondee(const SPtr<Interface>& respondee) override {
_respondee = respondee;
}
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 86e98661..fba24f06 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -233,7 +233,11 @@ public:
BufferRef value_buffer(uint32_t voice) const;
BufferRef user_buffer(RunContext&) const { return _user_buffer; }
- void set_user_buffer(RunContext&, BufferRef b) { _user_buffer = b; }
+
+ void set_user_buffer(RunContext&, BufferRef b)
+ {
+ _user_buffer = std::move(b);
+ }
/** Return offset of the first value change after `offset`. */
virtual SampleCount next_value_offset(SampleCount offset,
diff --git a/src/server/SocketServer.hpp b/src/server/SocketServer.hpp
index f3f02a26..cd5afb25 100644
--- a/src/server/SocketServer.hpp
+++ b/src/server/SocketServer.hpp
@@ -36,9 +36,9 @@ namespace server {
class SocketServer
{
public:
- SocketServer(World& world,
- server::Engine& engine,
- SPtr<Raul::Socket> sock)
+ SocketServer(World& world,
+ server::Engine& engine,
+ const SPtr<Raul::Socket>& sock)
: _engine(engine)
, _sink(world.conf().option("dump").get<int32_t>()
? SPtr<Interface>(