diff options
author | David Robillard <d@drobilla.net> | 2009-05-28 02:48:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-28 02:48:23 +0000 |
commit | f2c45c3f5b1f6c06d351ed91223343cd3a69ab4b (patch) | |
tree | 757a86fb2aac3de4d53c6d081ac3c218d97edc25 /src/shared | |
parent | c9a25fcc6150290790457f837355735b513b7239 (diff) | |
download | ingen-f2c45c3f5b1f6c06d351ed91223343cd3a69ab4b.tar.gz ingen-f2c45c3f5b1f6c06d351ed91223343cd3a69ab4b.tar.bz2 ingen-f2c45c3f5b1f6c06d351ed91223343cd3a69ab4b.zip |
Fix URIs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2018 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ResourceImpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 784c82b8..9e403be3 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -38,7 +38,7 @@ ResourceImpl::add_property(const Raul::URI& uri, const Raul::Atom& value) // Ignore duplicate statements typedef Resource::Properties::const_iterator iterator; const std::pair<iterator,iterator> range = _properties.equal_range(uri); - for (iterator i = range.first; i != range.second; ++i) + for (iterator i = range.first; i != range.second && i != _properties.end(); ++i) if (i->second == value) return; @@ -50,6 +50,8 @@ ResourceImpl::add_property(const Raul::URI& uri, const Raul::Atom& value) void ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) { + cerr << "SET PROPERTY " << uri << " = " << value << endl; + assert(value.type() != Raul::Atom::URI || strcmp(value.get_uri(), "lv2:ControlPort")); _properties.erase(uri); _properties.insert(make_pair(uri, value)); } @@ -128,7 +130,7 @@ ResourceImpl::merge_properties(const Properties& p) { typedef Resource::Properties::const_iterator iterator; for (iterator i = p.begin(); i != p.end(); ++i) - set_property(i->first, i->second); + add_property(i->first, i->second); } |