diff options
author | David Robillard <d@drobilla.net> | 2010-01-29 07:58:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-01-29 07:58:13 +0000 |
commit | f02ac2f82a0342c3e548a81950734b4bce383b7d (patch) | |
tree | 06a51f5be2d41bdd8a52f1a6f8888f5f4d3db5f5 /src/shared | |
parent | 96613df7830699dbbfb5c2d9fe3ebdb0598e6aca (diff) | |
download | ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.tar.gz ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.tar.bz2 ingen-f02ac2f82a0342c3e548a81950734b4bce383b7d.zip |
Improved/quicker/easier handling of control port ranges.
* Add "Set minimum to current value", "Set maximum to current value",
and "Reset range" to control port context menu.
* Only serialise properties (e.g. lv2:minimum) if they differ from
the meta object's (prototype's, e.g. plugin) value.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2395 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ResourceImpl.cpp | 4 | ||||
-rw-r--r-- | src/shared/ResourceImpl.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 949a8b36..625e8c17 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -63,10 +63,10 @@ ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) bool -ResourceImpl::has_property(const Raul::URI& uri, const Raul::Atom& value) +ResourceImpl::has_property(const Raul::URI& uri, const Raul::Atom& value) const { Properties::const_iterator i = _properties.find(uri); - for (; i->first == uri; ++i) { + for (; (i != _properties.end()) && (i->first == uri); ++i) { if (i->second == value) { return true; } diff --git a/src/shared/ResourceImpl.hpp b/src/shared/ResourceImpl.hpp index 7ff88f6a..9cb40521 100644 --- a/src/shared/ResourceImpl.hpp +++ b/src/shared/ResourceImpl.hpp @@ -40,7 +40,7 @@ public: const Raul::Atom& get_property(const Raul::URI& uri) const; Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value); - bool has_property(const Raul::URI& uri, const Raul::Atom& value); + bool has_property(const Raul::URI& uri, const Raul::Atom& value) const; void add_property(const Raul::URI& uri, const Raul::Atom& value); void set_properties(const Properties& p); void add_properties(const Properties& p); |