use musical_time_equal() test for equality when copying note data, not strict floating point equality. should fix #4609 (and maybe another one too)
git-svn-id: svn://localhost/ardour2/branches/3.0@11407 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
34881407e7
commit
40af4b914f
@ -39,7 +39,7 @@ Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v)
|
||||
_off_event.buffer()[1] = n;
|
||||
_off_event.buffer()[2] = 0x40;
|
||||
|
||||
assert(time() == t);
|
||||
assert(musical_time_equal (time(),t));
|
||||
assert(musical_time_equal (length(), l));
|
||||
assert(note() == n);
|
||||
assert(velocity() == v);
|
||||
@ -66,12 +66,12 @@ Note<Time>::Note(const Note<Time>& copy)
|
||||
_off_event.buffer = _off_event_buffer;
|
||||
memcpy(_off_event_buffer, copy._off_event_buffer, 3);
|
||||
*/
|
||||
|
||||
assert(time() == copy.time());
|
||||
assert(end_time() == copy.end_time());
|
||||
|
||||
assert(musical_time_equal (time(),copy.time()));
|
||||
assert(musical_time_equal (end_time(), copy.end_time()));
|
||||
assert(musical_time_equal (length(), copy.length()));
|
||||
assert(note() == copy.note());
|
||||
assert(velocity() == copy.velocity());
|
||||
assert(length() == copy.length());
|
||||
assert(_on_event.channel() == _off_event.channel());
|
||||
assert(channel() == copy.channel());
|
||||
}
|
||||
@ -95,11 +95,11 @@ Note<Time>::operator=(const Note<Time>& other)
|
||||
_on_event = other._on_event;
|
||||
_off_event = other._off_event;
|
||||
|
||||
assert(time() == other.time());
|
||||
assert(end_time() == other.end_time());
|
||||
assert(musical_time_equal (time(),other.time()));
|
||||
assert(musical_time_equal (end_time(), other.end_time()));
|
||||
assert(musical_time_equal (length(), other.length()));
|
||||
assert(note() == other.note());
|
||||
assert(velocity() == other.velocity());
|
||||
assert(length() == other.length());
|
||||
assert(_on_event.channel() == _off_event.channel());
|
||||
assert(channel() == other.channel());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user