summaryrefslogtreecommitdiffstats
path: root/src/server/ControlBindings.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 19:13:33 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 20:59:06 +0100
commit14cd32a043552d39738ae0e84e4ef8ab93783296 (patch)
tree829845243215ed3fd96ff8fd6d6f324c35a60b3e /src/server/ControlBindings.cpp
parent88dff1aabd3c81d1d81ac256e0061b98e0d24cec (diff)
downloadingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.gz
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.tar.bz2
ingen-14cd32a043552d39738ae0e84e4ef8ab93783296.zip
Cleanup: Use "auto" to avoid repeating type names
Diffstat (limited to 'src/server/ControlBindings.cpp')
-rw-r--r--src/server/ControlBindings.cpp9
1 files changed, 4 insertions, 5 deletions
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<LV2_Atom_Sequence>();
+ auto* seq = buffer->get<LV2_Atom_Sequence>();
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