summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-08-12 15:21:10 +0000
committerDavid Robillard <d@drobilla.net>2015-08-12 15:21:10 +0000
commit577570aa55b2ca0eba7759d13624b179275d65b8 (patch)
treecdb3a1b137d369601f25cbec6e04a54f68570af1 /ingen
parentdd79e76e41446833088482588456afed37231bff (diff)
downloadingen-577570aa55b2ca0eba7759d13624b179275d65b8.tar.gz
ingen-577570aa55b2ca0eba7759d13624b179275d65b8.tar.bz2
ingen-577570aa55b2ca0eba7759d13624b179275d65b8.zip
Fix URI comparison issues.
Fixes issue #1074. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5704 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/URIs.hpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp
index a10cd30c..d38b840e 100644
--- a/ingen/URIs.hpp
+++ b/ingen/URIs.hpp
@@ -47,8 +47,8 @@ public:
struct Quark : public Raul::URI {
Quark(Ingen::Forge& forge, URIMap* map, const char* str);
- operator LV2_URID() const { return urid.get<LV2_URID>(); }
- operator Atom() const { return urid; }
+ operator LV2_URID() const { return urid.get<LV2_URID>(); }
+ explicit operator Atom() const { return urid; }
inline bool operator==(const Atom& rhs) const {
if (rhs.type() == urid.type()) {
@@ -59,6 +59,10 @@ public:
return false;
}
+ inline bool operator!=(const Atom& rhs) const {
+ return !operator==(rhs);
+ }
+
Atom urid;
Atom uri;
};
@@ -181,6 +185,14 @@ public:
const Quark time_speed;
};
+inline bool operator==(const Atom& a, const URIs::Quark& b) {
+ return b == a;
+}
+
+inline bool operator!=(const Atom& a, const URIs::Quark& b) {
+ return b != a;
+}
+
} // namespace Ingen
-#endif // INGEN_LV2URIMAP_HPP
+#endif // INGEN_URIS_HPP