From 698c38587bd4f0133a132dc363098ff8298ec47b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 May 2009 18:05:24 +0000 Subject: * New ontology. * Display human names on patch ports on creation, if enabled. * Fix copy/paste of subpatches. * Split properties into "properties" (class properties) and "variables" (instance properties). * Names are kind of a legacy leftover... * Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/Builder.cpp | 2 +- src/shared/ResourceImpl.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/shared') diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index f73b0e11..9da71a09 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -89,7 +89,7 @@ Builder::connect(SharedPtr object) void Builder::build_object(SharedPtr object) { - for (GraphObject::Variables::const_iterator i = object->variables().begin(); + for (GraphObject::Properties::const_iterator i = object->variables().begin(); i != object->variables().end(); ++i) _interface.set_variable(object->path(), i->first, i->second); diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 4dd25602..10c57fbe 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -34,10 +34,7 @@ ResourceImpl::get_property(const std::string& uri) const { static const Raul::Atom nil; Properties::const_iterator i = _properties.find(uri); - if (i == _properties.end()) - return nil; - else - return i->second; + return (i != _properties.end()) ? i->second : nil; } -- cgit v1.2.1