From 14cd32a043552d39738ae0e84e4ef8ab93783296 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 19:13:33 +0100 Subject: Cleanup: Use "auto" to avoid repeating type names --- src/server/ControlBindings.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/server/ControlBindings.cpp') diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 4e40afab..ce08950e 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -78,8 +78,7 @@ ControlBindings::binding_key(const Atom& binding) const Key key; LV2_Atom* num = nullptr; if (binding.type() == uris.atom_Object) { - const LV2_Atom_Object_Body* obj = (const LV2_Atom_Object_Body*) - binding.get_body(); + const auto* obj = (const LV2_Atom_Object_Body*)binding.get_body(); if (obj->otype == uris.midi_Bender) { key = Key(Type::MIDI_BENDER); } else if (obj->otype == uris.midi_ChannelPressure) { @@ -406,11 +405,11 @@ ControlBindings::pre_process(RunContext& ctx, Buffer* buffer) return; // Don't bother reading input } - LV2_Atom_Sequence* seq = buffer->get(); + auto* seq = buffer->get(); LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { if (ev->body.type == uris.midi_MidiEvent) { - const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); - const Key key = midi_event_key(ev->body.size, buf, value); + const auto* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); + const Key key = midi_event_key(ev->body.size, buf, value); if (_learn_binding && !!key) { finish_learn(ctx, key); // Learn new binding -- cgit v1.2.1