summaryrefslogtreecommitdiff
path: root/libs/evoral/src/Note.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-04 02:15:16 +0000
committerDavid Robillard <d@drobilla.net>2009-05-04 02:15:16 +0000
commitb034d9d05a64bf7f9f8a6465dee5441388fce6c5 (patch)
tree2ba3a3c2fdad437c5e3de69e84c4b4484df581e4 /libs/evoral/src/Note.cpp
parent8491953e20645af21eee74e760da3a4399fd4e23 (diff)
Maybe fix assertion crash.
git-svn-id: svn://localhost/ardour2/branches/3.0@5031 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral/src/Note.cpp')
-rw-r--r--libs/evoral/src/Note.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/evoral/src/Note.cpp b/libs/evoral/src/Note.cpp
index 3915489d02..51aee00958 100644
--- a/libs/evoral/src/Note.cpp
+++ b/libs/evoral/src/Note.cpp
@@ -17,6 +17,7 @@
*/
#include <iostream>
+#include <limits>
#include "evoral/Note.hpp"
namespace Evoral {
@@ -38,7 +39,7 @@ Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v)
_off_event.buffer()[2] = 0x40;
assert(time() == t);
- assert(length() == l);
+ assert(length() - l <= std::numeric_limits<Time>::epsilon());
assert(note() == n);
assert(velocity() == v);
assert(_on_event.channel() == _off_event.channel());