diff options
author | David Robillard <d@drobilla.net> | 2019-03-09 17:44:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-12 19:42:09 +0100 |
commit | 3c0ed6b66b6e99c68fc01c86b5796a55d74a5977 (patch) | |
tree | 7be3252c13ef123b956424169c1bfbf55359564a /src/server/events/Delta.cpp | |
parent | e32f32a360f2bf8f017ea347b6d1e568c0beaf68 (diff) | |
download | ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.tar.gz ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.tar.bz2 ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.zip |
WIP: Port to serd1serd1
Diffstat (limited to 'src/server/events/Delta.cpp')
-rw-r--r-- | src/server/events/Delta.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 0a7b05ea..ab751b76 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -35,6 +35,8 @@ #include "ingen/World.hpp" #include "raul/Maid.hpp" +#include <boost/optional/optional_io.hpp> + #include <mutex> #include <set> #include <string> @@ -364,7 +366,7 @@ Delta::pre_process(PreProcessContext& ctx) _status = Status::BAD_VALUE_TYPE; } } else if (key == uris.pset_preset) { - URI uri; + boost::optional<URI> uri; if (uris.forge.is_uri(value)) { const std::string uri_str = uris.forge.str(value, false); if (URI::is_valid(uri_str)) { @@ -374,9 +376,9 @@ Delta::pre_process(PreProcessContext& ctx) uri = URI(FilePath(value.ptr<char>())); } - if (!uri.empty()) { + if (uri) { op = SpecialType::PRESET; - if ((_state = block->load_preset(uri))) { + if ((_state = block->load_preset(*uri))) { lilv_state_emit_port_values( _state, s_add_set_event, this); } else { |