From 2c03f2abd3d3d98a81020438ca805acded39dbab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Jan 2014 04:47:33 +0000 Subject: 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 --- src/client/ClientStore.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/client/ClientStore.cpp') 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(); - SPtr p( - new PortModel(uris(), path, index, pdir)); - p->set_properties(properties); - add_object(p); + index = i->second.get(); } else { _log.error(fmt("Port %1% has no index\n") % path); } + + SPtr 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()); -- cgit v1.2.1