summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-25 16:13:15 -0500
committerDavid Robillard <d@drobilla.net>2017-12-25 16:26:13 -0500
commitbd89362f08dc07b3444d19bc373f2b4f8bc47b2c (patch)
tree047cd2cf2779d87f1db561186410aa545f632c7b /src/server
parent71808f61f7db48a7ab4e16537b94ee5686749909 (diff)
downloadingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.tar.gz
ingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.tar.bz2
ingen-bd89362f08dc07b3444d19bc373f2b4f8bc47b2c.zip
Use std::move to potentially avoid copying
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ControlBindings.hpp2
-rw-r--r--src/server/Event.hpp2
-rw-r--r--src/server/ingen_lv2.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index aed1b607..756ddd66 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -67,7 +67,7 @@ public:
/** One binding of a controller to a port. */
struct Binding : public boost::intrusive::set_base_hook<>,
public Raul::Maid::Disposable {
- Binding(Key k=Key(), PortImpl* p=nullptr) : key(k), port(p) {}
+ Binding(Key k=Key(), PortImpl* p=nullptr) : key(std::move(k)), port(p) {}
inline bool operator<(const Binding& rhs) const { return key < rhs.key; }
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index 09018163..48c9580d 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -108,7 +108,7 @@ protected:
Event(Engine& engine, SPtr<Interface> client, int32_t id, FrameTime time)
: _engine(engine)
, _next(nullptr)
- , _request_client(client)
+ , _request_client(std::move(client))
, _request_id(id)
, _time(time)
, _status(Status::NOT_PREPARED)
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 2ad2a1f1..92cb52b0 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -60,7 +60,7 @@ namespace Ingen {
/** Record of a graph in this bundle. */
struct LV2Graph : public Parser::ResourceRecord {
- LV2Graph(const Parser::ResourceRecord& record);
+ LV2Graph(Parser::ResourceRecord record);
LV2_Descriptor descriptor;
};
@@ -791,8 +791,8 @@ ingen_extension_data(const char* uri)
return nullptr;
}
-LV2Graph::LV2Graph(const Parser::ResourceRecord& record)
- : Parser::ResourceRecord(record)
+LV2Graph::LV2Graph(Parser::ResourceRecord record)
+ : Parser::ResourceRecord(std::move(record))
{
descriptor.URI = uri.c_str();
descriptor.instantiate = ingen_instantiate;