diff options
author | David Robillard <d@drobilla.net> | 2014-11-20 15:32:06 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-20 15:32:06 -0500 |
commit | 8bba63282a4d641287d6da945fc7ce49b583038c (patch) | |
tree | 486b62c6c73363dbe67f66126c55aa1214264eaa /libs/ardour/meter.cc | |
parent | 7def8de5a3ce6ca6e022075bf3b9faf24fc2a129 (diff) |
Reduce unnecessary non-const MIDI buffer access.
Diffstat (limited to 'libs/ardour/meter.cc')
-rw-r--r-- | libs/ardour/meter.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc index 80690bd744..5913ca5477 100644 --- a/libs/ardour/meter.cc +++ b/libs/ardour/meter.cc @@ -87,9 +87,9 @@ PeakMeter::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_fr // Meter MIDI in to the first n_midi peaks for (uint32_t i = 0; i < n_midi; ++i, ++n) { float val = 0.0f; - MidiBuffer& buf (bufs.get_midi(i)); + const MidiBuffer& buf (bufs.get_midi(i)); - for (MidiBuffer::iterator e = buf.begin(); e != buf.end(); ++e) { + for (MidiBuffer::const_iterator e = buf.begin(); e != buf.end(); ++e) { const Evoral::MIDIEvent<framepos_t> ev(*e, false); if (ev.is_note_on()) { const float this_vel = ev.buffer()[2] / 127.0; |