diff options
author | David Robillard <d@drobilla.net> | 2019-03-09 17:44:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 15:54:05 +0200 |
commit | cc672193b82a4b314d59aa2e572a5e9667c34f1b (patch) | |
tree | 55796d4b55304ed306acd417ebc4b39c862563fd /src/server/events/Delta.cpp | |
parent | f48f9d69a541d758dc9928c0c89eae46819e660f (diff) | |
download | ingen-cc672193b82a4b314d59aa2e572a5e9667c34f1b.tar.gz ingen-cc672193b82a4b314d59aa2e572a5e9667c34f1b.tar.bz2 ingen-cc672193b82a4b314d59aa2e572a5e9667c34f1b.zip |
WIP: Port to serd1
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 f5928c12..fde43599 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> @@ -365,7 +367,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)) { @@ -375,9 +377,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 { |