summaryrefslogtreecommitdiffstats
path: root/src/gui/ThreadedLoader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-14 21:25:19 +0100
committerDavid Robillard <d@drobilla.net>2020-12-14 22:04:29 +0100
commit3669e06dd20d43d30bf89ac29e9055e0725b3564 (patch)
tree6086002971126dba88aa762aa1d487069395a137 /src/gui/ThreadedLoader.cpp
parent6d82745afdeff69ace846e0c10bf95b3362e1c03 (diff)
downloadingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.gz
ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.tar.bz2
ingen-3669e06dd20d43d30bf89ac29e9055e0725b3564.zip
Fix unnecessary parameter copying overhead
Diffstat (limited to 'src/gui/ThreadedLoader.cpp')
-rw-r--r--src/gui/ThreadedLoader.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 41b1320e..edc1ad4c 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -72,11 +72,11 @@ ThreadedLoader::run()
}
void
-ThreadedLoader::load_graph(bool merge,
- const FilePath& file_path,
- optional<Raul::Path> engine_parent,
- optional<Raul::Symbol> engine_symbol,
- optional<Properties> engine_data)
+ThreadedLoader::load_graph(bool merge,
+ const FilePath& file_path,
+ const optional<Raul::Path>& engine_parent,
+ const optional<Raul::Symbol>& engine_symbol,
+ const optional<Properties>& engine_data)
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -100,10 +100,10 @@ ThreadedLoader::load_graph(bool merge,
}
void
-ThreadedLoader::load_graph_event(const FilePath& file_path,
- optional<Raul::Path> engine_parent,
- optional<Raul::Symbol> engine_symbol,
- optional<Properties> engine_data)
+ThreadedLoader::load_graph_event(const FilePath& file_path,
+ const optional<Raul::Path>& engine_parent,
+ const optional<Raul::Symbol>& engine_symbol,
+ const optional<Properties>& engine_data)
{
std::lock_guard<std::mutex> lock(_app.world().rdf_mutex());
@@ -116,8 +116,9 @@ ThreadedLoader::load_graph_event(const FilePath& file_path,
}
void
-ThreadedLoader::save_graph(std::shared_ptr<const client::GraphModel> model,
- const URI& uri)
+ThreadedLoader::save_graph(
+ const std::shared_ptr<const client::GraphModel>& model,
+ const URI& uri)
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -131,8 +132,8 @@ ThreadedLoader::save_graph(std::shared_ptr<const client::GraphModel> model,
void
ThreadedLoader::save_graph_event(
- std::shared_ptr<const client::GraphModel> model,
- const URI& uri)
+ const std::shared_ptr<const client::GraphModel>& model,
+ const URI& uri)
{
assert(uri.scheme() == "file");
if (_app.serialiser()) {