summaryrefslogtreecommitdiff
path: root/libs/evoral/test/SequenceTest.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-11-06 22:04:35 -0500
committerDavid Robillard <d@drobilla.net>2016-12-03 15:18:21 -0500
commit08fffeffec10beb708610fd35eb9e7c35365d446 (patch)
treece9c8c77e6a926b4d8be90052c32945b7718bb4b /libs/evoral/test/SequenceTest.cpp
parent875b1367b2c4750ecd861424c57ed4bcc9c642d2 (diff)
Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like velocity() belong on Event at all, these may be better off as free functions. However the code currently uses them as methods in many places, and it seems like a step in the right direction, since, for example, we might some day have events that have a velocity but aren't stored as MIDI messages (e.g. if Ardour uses an internal musical model that is more expressive). In any case, the former inheritance and plethora of sloppy casts is definitely not the right thing.
Diffstat (limited to 'libs/evoral/test/SequenceTest.cpp')
-rw-r--r--libs/evoral/test/SequenceTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/evoral/test/SequenceTest.cpp b/libs/evoral/test/SequenceTest.cpp
index 39afcd3095..a3dfabe139 100644
--- a/libs/evoral/test/SequenceTest.cpp
+++ b/libs/evoral/test/SequenceTest.cpp
@@ -77,12 +77,12 @@ SequenceTest::iteratorSeekTest ()
bool on = true;
for (Sequence<Time>::const_iterator i = seq->begin(Evoral::Beats(600)); i != seq->end(); ++i) {
if (on) {
- CPPUNIT_ASSERT(((const MIDIEvent<Time>&)*i).is_note_on());
+ CPPUNIT_ASSERT((*i)->is_note_on());
CPPUNIT_ASSERT_EQUAL(i->time(), Time((num_notes + 6) * 100));
++num_notes;
on = false;
} else {
- CPPUNIT_ASSERT(((const MIDIEvent<Time>&)*i).is_note_off());
+ CPPUNIT_ASSERT((*i)->is_note_off());
on = true;
}
}