summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-14 04:23:23 +0000
committerDavid Robillard <d@drobilla.net>2012-08-14 04:23:23 +0000
commit80fee5c311fdbdeda573ec81f59158a5fc87d0a1 (patch)
tree8e7e5a6c9bda32bbe0ae8e8c9f6ab23e44c7c181 /src/server/events
parent058eaf65642268047a984a5c80d54a1f62a85130 (diff)
downloadingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.gz
ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.bz2
ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.zip
Update for latest Raul.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4687 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/CreateNode.cpp5
-rw-r--r--src/server/events/Move.cpp9
2 files changed, 8 insertions, 6 deletions
diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateNode.cpp
index 0c3e34bf..acdc9091 100644
--- a/src/server/events/CreateNode.cpp
+++ b/src/server/events/CreateNode.cpp
@@ -57,10 +57,10 @@ CreateNode::pre_process()
return Event::pre_process_done(BAD_URI, _path);
}
- std::string plugin_uri;
+ std::string plugin_uri_str;
const iterator t = _properties.find(uris.ingen_prototype);
if (t != _properties.end() && t->second.type() == uris.forge.URI) {
- plugin_uri = t->second.get_uri();
+ plugin_uri_str = t->second.get_uri();
} else {
return Event::pre_process_done(BAD_REQUEST);
}
@@ -73,6 +73,7 @@ CreateNode::pre_process()
return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent());
}
+ const Raul::URI plugin_uri(plugin_uri_str);
PluginImpl* plugin = _engine.node_factory()->plugin(plugin_uri);
if (!plugin) {
return Event::pre_process_done(PLUGIN_NOT_FOUND, Raul::URI(plugin_uri));
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 5c16ca8b..17ad1a70 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -77,11 +77,12 @@ Move::pre_process()
assert(Raul::Path::descendant_comparator(_old_path, child_old_path));
Raul::Path child_new_path;
- if (child_old_path == _old_path)
+ if (child_old_path == _old_path) {
child_new_path = _new_path;
- else
- child_new_path = Raul::Path(_new_path).base()
- + child_old_path.substr(_old_path.length() + 1);
+ } else {
+ child_new_path = Raul::Path(
+ _new_path.base() + child_old_path.substr(_old_path.length() + 1));
+ }
PtrCast<GraphObjectImpl>(i->second)->set_path(child_new_path);
i->first = child_new_path;