issue 0005121: added comment to source. Sorry, last commit was for issue 0005121...
[ardour.git] / libs / evoral / src / Note.cpp
index 01820b70e7210526b6642fe4a719a72b41f65004..8ff3ccaff1772339d0068c4c5837c341f6c6f286 100644 (file)
@@ -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());