summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-01 16:05:03 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 01:48:48 +0200
commit6436ce26daefba37c7a612591a33b18365db69b7 (patch)
tree88da992e3de43c90ee98f8df73a7af21cd77d26f /ingen
parent0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4 (diff)
downloadingen-6436ce26daefba37c7a612591a33b18365db69b7.tar.gz
ingen-6436ce26daefba37c7a612591a33b18365db69b7.tar.bz2
ingen-6436ce26daefba37c7a612591a33b18365db69b7.zip
Pass by value and use std::move
Diffstat (limited to 'ingen')
-rw-r--r--ingen/FilePath.hpp3
-rw-r--r--ingen/Resource.hpp4
-rw-r--r--ingen/client/BlockModel.hpp4
-rw-r--r--ingen/client/GraphModel.hpp7
4 files changed, 9 insertions, 9 deletions
diff --git a/ingen/FilePath.hpp b/ingen/FilePath.hpp
index 98893dfc..337553ef 100644
--- a/ingen/FilePath.hpp
+++ b/ingen/FilePath.hpp
@@ -54,8 +54,7 @@ public:
FilePath(const FilePath&) = default;
FilePath(FilePath&&) = default;
- FilePath(string_type&& str) : _str(std::move(str)) {}
- FilePath(const string_type& str) : _str(str) {}
+ FilePath(string_type str) : _str(std::move(str)) {}
FilePath(const value_type* str) : _str(str) {}
FilePath(const boost::basic_string_view<value_type>& sv)
: _str(sv.data(), sv.length())
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index cc1f5db0..481e4c30 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -41,9 +41,9 @@ class INGEN_API Resource : public Raul::Deletable
public:
using Graph = Property::Graph;
- Resource(const URIs& uris, const URI& uri)
+ Resource(const URIs& uris, URI uri)
: _uris(uris)
- , _uri(uri)
+ , _uri(std::move(uri))
{}
Resource(const Resource& resource) = default;
diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp
index 511e5712..d003b7d1 100644
--- a/ingen/client/BlockModel.hpp
+++ b/ingen/client/BlockModel.hpp
@@ -84,9 +84,7 @@ public:
protected:
friend class ClientStore;
- BlockModel(URIs& uris,
- const URI& plugin_uri,
- const Raul::Path& path);
+ BlockModel(URIs& uris, URI plugin_uri, const Raul::Path& path);
BlockModel(URIs& uris,
const SPtr<PluginModel>& plugin,
diff --git a/ingen/client/GraphModel.hpp b/ingen/client/GraphModel.hpp
index c11c419e..2248e7e3 100644
--- a/ingen/client/GraphModel.hpp
+++ b/ingen/client/GraphModel.hpp
@@ -60,8 +60,11 @@ private:
friend class ClientStore;
GraphModel(URIs& uris, const Raul::Path& graph_path)
- : BlockModel(uris, uris.ingen_Graph, graph_path)
- {}
+ : BlockModel(uris,
+ static_cast<const URI&>(uris.ingen_Graph),
+ graph_path)
+ {
+ }
void clear() override;
void add_child(const SPtr<ObjectModel>& c) override;