summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-24 04:47:33 +0000
committerDavid Robillard <d@drobilla.net>2014-01-24 04:47:33 +0000
commit2c03f2abd3d3d98a81020438ca805acded39dbab (patch)
tree92abb5ae29cbc25a0655e7aa5b6a8c07bbff6756 /src/client
parentd970641441746aacfc645176b71d7ba71af0463a (diff)
downloadingen-2c03f2abd3d3d98a81020438ca805acded39dbab.tar.gz
ingen-2c03f2abd3d3d98a81020438ca805acded39dbab.tar.bz2
ingen-2c03f2abd3d3d98a81020438ca805acded39dbab.zip
Remove redundant and unnecessary properties from saved graphs and protocol.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5321 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientStore.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 02f5f4f0..f5c99e38 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -289,16 +289,17 @@ ClientStore::put(const Raul::URI& uri,
PortModel::Direction pdir = (is_output)
? PortModel::Direction::OUTPUT
: PortModel::Direction::INPUT;
- const Iterator i = properties.find(_uris.lv2_index);
+ uint32_t index = 0;
+ const Iterator i = properties.find(_uris.lv2_index);
if (i != properties.end() && i->second.type() == _uris.forge.Int) {
- const uint32_t index = i->second.get<int32_t>();
- SPtr<PortModel> p(
- new PortModel(uris(), path, index, pdir));
- p->set_properties(properties);
- add_object(p);
+ index = i->second.get<int32_t>();
} else {
_log.error(fmt("Port %1% has no index\n") % path);
}
+
+ SPtr<PortModel> p(new PortModel(uris(), path, index, pdir));
+ p->set_properties(properties);
+ add_object(p);
} else {
_log.warn(fmt("Ignoring object %1% with unknown type\n")
% path.c_str());