summaryrefslogtreecommitdiffstats
path: root/src/server/events/Copy.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-08 09:06:55 +0100
committerDavid Robillard <d@drobilla.net>2019-03-08 09:06:55 +0100
commitacb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9 (patch)
treea229f986933c8ef9d9c15b36ecf58b04ebeaa7c0 /src/server/events/Copy.cpp
parent112eb3a668f65547b1757978b02cbafebf97b794 (diff)
downloadingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.gz
ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.tar.bz2
ingen-acb958e95d0e8ca1b0dd912fe8bbf2e14e5f74e9.zip
Pass World everywhere by reference
Diffstat (limited to 'src/server/events/Copy.cpp')
-rw-r--r--src/server/events/Copy.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp
index 960b6004..8c23568b 100644
--- a/src/server/events/Copy.cpp
+++ b/src/server/events/Copy.cpp
@@ -143,18 +143,18 @@ Copy::engine_to_filesystem(PreProcessContext& ctx)
return Event::pre_process_done(Status::BAD_OBJECT_TYPE, _msg.old_uri);
}
- if (!_engine.world()->serialiser()) {
+ if (!_engine.world().serialiser()) {
return Event::pre_process_done(Status::INTERNAL_ERROR);
}
- std::lock_guard<std::mutex> lock(_engine.world()->rdf_mutex());
+ std::lock_guard<std::mutex> lock(_engine.world().rdf_mutex());
if (ends_with(_msg.new_uri, ".ingen") || ends_with(_msg.new_uri, ".ingen/")) {
- _engine.world()->serialiser()->write_bundle(graph, URI(_msg.new_uri));
+ _engine.world().serialiser()->write_bundle(graph, URI(_msg.new_uri));
} else {
- _engine.world()->serialiser()->start_to_file(graph->path(), _msg.new_uri);
- _engine.world()->serialiser()->serialise(graph);
- _engine.world()->serialiser()->finish();
+ _engine.world().serialiser()->start_to_file(graph->path(), _msg.new_uri);
+ _engine.world().serialiser()->serialise(graph);
+ _engine.world().serialiser()->finish();
}
return Event::pre_process_done(Status::SUCCESS);
@@ -163,11 +163,11 @@ Copy::engine_to_filesystem(PreProcessContext& ctx)
bool
Copy::filesystem_to_engine(PreProcessContext& ctx)
{
- if (!_engine.world()->parser()) {
+ if (!_engine.world().parser()) {
return Event::pre_process_done(Status::INTERNAL_ERROR);
}
- std::lock_guard<std::mutex> lock(_engine.world()->rdf_mutex());
+ std::lock_guard<std::mutex> lock(_engine.world().rdf_mutex());
// Old URI is a filesystem path and new URI is a path within the engine
const std::string src_path(_msg.old_uri.path());
@@ -179,8 +179,8 @@ Copy::filesystem_to_engine(PreProcessContext& ctx)
dst_symbol = Raul::Symbol(dst_path.symbol());
}
- _engine.world()->parser()->parse_file(
- *_engine.world(), *_engine.world()->interface(), src_path,
+ _engine.world().parser()->parse_file(
+ _engine.world(), *_engine.world().interface(), src_path,
dst_parent, dst_symbol);
return Event::pre_process_done(Status::SUCCESS);