aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-08 21:12:35 +0100
committerDavid Robillard <d@drobilla.net>2019-03-09 00:43:44 +0100
commit50b5df8e10ecb32b2691dd3871de92539766d451 (patch)
treedc8810eb35d835eba7c031e0cc5636abc76b263c /src
parent2d76872a6c2d55df18c44ed39fc3a6cbfa3d2ea3 (diff)
downloadingen-50b5df8e10ecb32b2691dd3871de92539766d451.tar.gz
ingen-50b5df8e10ecb32b2691dd3871de92539766d451.tar.bz2
ingen-50b5df8e10ecb32b2691dd3871de92539766d451.zip
Make start_to_file() take a FilePath for type safety
Diffstat (limited to 'src')
-rw-r--r--src/Serialiser.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp2
-rw-r--r--src/server/events/Copy.cpp3
-rw-r--r--src/server/ingen_lv2.cpp3
4 files changed, 6 insertions, 4 deletions
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp
index 8184429e..fede65c6 100644
--- a/src/Serialiser.cpp
+++ b/src/Serialiser.cpp
@@ -240,7 +240,7 @@ Serialiser::start_to_string(const Raul::Path& root, const URI& base_uri)
}
void
-Serialiser::start_to_file(const Raul::Path& root, const std::string& filename)
+Serialiser::start_to_file(const Raul::Path& root, const FilePath& filename)
{
me->start_to_file(root, filename);
}
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 9d87fba5..45ac4f7f 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -138,7 +138,7 @@ ThreadedLoader::save_graph_event(SPtr<const client::GraphModel> model,
if (uri.string().find(".ingen") != std::string::npos) {
_app.serialiser()->write_bundle(model, uri);
} else {
- _app.serialiser()->start_to_file(model->path(), std::string(uri.path()));
+ _app.serialiser()->start_to_file(model->path(), uri.file_path());
_app.serialiser()->serialise(model);
_app.serialiser()->finish();
}
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp
index 9fa3deed..38cbc6d8 100644
--- a/src/server/events/Copy.cpp
+++ b/src/server/events/Copy.cpp
@@ -157,7 +157,8 @@ Copy::engine_to_filesystem(PreProcessContext& ctx)
if (ends_with(_msg.new_uri, ".ingen") || ends_with(_msg.new_uri, ".ingen/")) {
_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()->start_to_file(graph->path(),
+ _msg.new_uri.file_path());
_engine.world().serialiser()->serialise(graph);
_engine.world().serialiser()->finish();
}
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 625f87c6..b40ccbf9 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -720,7 +720,8 @@ ingen_save(LV2_Handle instance,
{
std::lock_guard<std::mutex> lock(plugin->world->rdf_mutex());
- plugin->world->serialiser()->start_to_file(root->second->path(), real_path);
+ plugin->world->serialiser()->start_to_file(
+ root->second->path(), FilePath{real_path});
plugin->world->serialiser()->serialise(root->second);
plugin->world->serialiser()->finish();
}