diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index c84327f5a7..74d1781aef 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -285,10 +285,8 @@ MackieControlProtocol::switch_banks (int initial) DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to %1, %2\n", _current_initial_bank, end_pos)); - // clear out routes from our table in case any have been deleted - for (vector >::iterator i = route_table.begin(); i != route_table.end(); ++i) { - i->reset (); - } + route_table.clear (); + set_route_table_size (surface().strips.size()); // link routes to strips uint32_t i = 0; diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc index ae9a7bf1fb..02d52207cb 100644 --- a/libs/surfaces/mackie/mackie_port.cc +++ b/libs/surfaces/mackie/mackie_port.cc @@ -314,7 +314,8 @@ void MackiePort::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size } } -Control & MackiePort::lookup_control (MIDI::byte * bytes, size_t count) +Control& +MackiePort::lookup_control (MIDI::byte * bytes, size_t count) { // Don't instantiate a MidiByteArray here unless it's needed for exceptions. // Reason being that this method is called for every single incoming @@ -375,7 +376,8 @@ Control & MackiePort::lookup_control (MIDI::byte * bytes, size_t count) // converts midi messages into control_event signals // it might be worth combining this with lookup_control // because they have similar logic flows. -void MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count) +void +MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count) { MidiByteArray bytes (count, raw_bytes); DEBUG_TRACE (DEBUG::MackieControl, string_compose ("MackiePort::handle_midi_any %1\n", bytes)); @@ -383,7 +385,9 @@ void MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t try { // ignore sysex messages - if (raw_bytes[0] == MIDI::sysex) return; + if (raw_bytes[0] == MIDI::sysex) { + return; + } // sanity checking if (count != 3) {