diff options
author | David Robillard <d@drobilla.net> | 2019-12-08 19:43:40 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-08 21:08:26 +0100 |
commit | 3a59f2d385e9a9bcc6fb939a4df6380c27f4d2ff (patch) | |
tree | e35246e9e658b2073dcdbb0d4bbb89fcf0068964 /src | |
parent | 097dd7167279729a7df9f0cef67c549e70e74d4e (diff) | |
download | ingen-3a59f2d385e9a9bcc6fb939a4df6380c27f4d2ff.tar.gz ingen-3a59f2d385e9a9bcc6fb939a4df6380c27f4d2ff.tar.bz2 ingen-3a59f2d385e9a9bcc6fb939a4df6380c27f4d2ff.zip |
Cleanup: Use brace initialisation to avoid repeating return type
Diffstat (limited to 'src')
-rw-r--r-- | src/server/ControlBindings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 4a0f5f20..51784452 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -123,18 +123,18 @@ ControlBindings::midi_event_key(uint16_t, const uint8_t* buf, uint16_t& value) switch (lv2_midi_message_type(buf)) { case LV2_MIDI_MSG_CONTROLLER: value = static_cast<int8_t>(buf[2]); - return Key(Type::MIDI_CC, static_cast<int8_t>(buf[1])); + return {Type::MIDI_CC, static_cast<int8_t>(buf[1])}; case LV2_MIDI_MSG_BENDER: value = (static_cast<int8_t>(buf[2]) << 7) + static_cast<int8_t>(buf[1]); - return Key(Type::MIDI_BENDER); + return {Type::MIDI_BENDER}; case LV2_MIDI_MSG_CHANNEL_PRESSURE: value = static_cast<int8_t>(buf[1]); - return Key(Type::MIDI_CHANNEL_PRESSURE); + return {Type::MIDI_CHANNEL_PRESSURE}; case LV2_MIDI_MSG_NOTE_ON: value = 1.0f; - return Key(Type::MIDI_NOTE, static_cast<int8_t>(buf[1])); + return {Type::MIDI_NOTE, static_cast<int8_t>(buf[1])}; default: - return Key(); + return {}; } } |