summaryrefslogtreecommitdiff
path: root/libs/evoral/evoral/Parameter.hpp
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-01-21 08:32:23 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-01-21 08:32:23 +0000
commit33852a0728d081864b83e74e900802be7ab6f2aa (patch)
tree1d8d6098a6652db161bacdcc96f2952f7f975ccc /libs/evoral/evoral/Parameter.hpp
parentc5659dda6e5840d60b58420d6b8a730955a8052e (diff)
* Added Menu to add a Program change parameter lane
* made adding automation lanes add them for every active channel on the track * Evoral::Parameter.hpp: Strict weak ordering again: make the proof a bit easier to read Make the implementation conform to the proof order Parameters according to type, then channel, then id git-svn-id: svn://localhost/ardour2/branches/3.0@4421 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/evoral/Parameter.hpp')
-rw-r--r--libs/evoral/evoral/Parameter.hpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/evoral/evoral/Parameter.hpp b/libs/evoral/evoral/Parameter.hpp
index ecc0129ccb..0f6d5afc4b 100644
--- a/libs/evoral/evoral/Parameter.hpp
+++ b/libs/evoral/evoral/Parameter.hpp
@@ -47,8 +47,8 @@ public:
virtual ~Parameter() {}
inline uint32_t type() const { return _type; }
- inline uint32_t id() const { return _id; }
inline uint8_t channel() const { return _channel; }
+ inline uint32_t id() const { return _id; }
/** Equivalence operator
* It is obvious from the definition that this operator
@@ -56,7 +56,7 @@ public:
* (see: http://www.sgi.com/tech/stl/StrictWeakOrdering.html)
*/
inline bool operator==(const Parameter& id) const {
- return (_type == id._type && _id == id._id && _channel == id._channel);
+ return (_type == id._type && _channel == id._channel && _id == id._id );
}
/** Strict weak ordering
@@ -68,9 +68,11 @@ public:
* <li>Irreflexivity: f(x, x) is false because of the irreflexivity of \c < in each branch.</li>
* <li>Antisymmetry: given x != y, f(x, y) implies !f(y, x) because of the same
* property of \c < in each branch and the symmetry of operator==. </li>
- * <li>Transitivity: let f(x, y) and f(y, z) be true.
- * We prove by contradiction, assuming the contrary (f(x, z) is false).
- * That would imply exactly one of the following:
+ * <li>Transitivity: let f(x, y) and f(y, z) => f(x, z) be true.
+ * We prove by contradiction, assuming the contrary:
+ * f(x, y) and f(x, z) hold => !f(x, z)
+ *
+ * That implies one of the following:
* <ol>
* <li> x == z which contradicts the assumption f(x, y) and f(y, x)
* because of antisymmetry.
@@ -87,12 +89,12 @@ public:
* </li>
* </ol>
*/
- inline bool operator<(const Parameter& id) const {
- if (_type < id._type) {
+ inline bool operator<(const Parameter& other) const {
+ if (_type < other._type) {
return true;
- } else if (_type == id._type && _id < id._id) {
+ } else if (_type == other._type && _channel < other._channel) {
return true;
- } else if (_id == id._id && _channel < id._channel) {
+ } else if (_type == other._type && _channel == other._channel && _id < other._id ) {
return true;
}