diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
commit | 3af246bb3291d8568f6d110884fa55ee5fd20221 (patch) | |
tree | 434ac316050356e4db379ba8305b75285b17bbba /src/gui/Style.cpp | |
parent | 44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (diff) | |
download | ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.gz ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.bz2 ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.zip |
Avoid "else" after "return", "break", and "continue"
Diffstat (limited to 'src/gui/Style.cpp')
-rw-r--r-- | src/gui/Style.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp index 7b9e4dc7..bce98648 100644 --- a/src/gui/Style.cpp +++ b/src/gui/Style.cpp @@ -69,17 +69,28 @@ uint32_t Style::get_port_color(const client::PortModel* p) { const URIs& uris = _app.uris(); + if (p->is_a(uris.lv2_AudioPort)) { return _audio_port_color; - } else if (p->is_a(uris.lv2_ControlPort)) { + } + + if (p->is_a(uris.lv2_ControlPort)) { return _control_port_color; - } else if (p->is_a(uris.lv2_CVPort)) { + } + + if (p->is_a(uris.lv2_CVPort)) { return _cv_port_color; - } else if (p->supports(uris.atom_String)) { + } + + if (p->supports(uris.atom_String)) { return _string_port_color; - } else if (_app.can_control(p)) { + } + + if (_app.can_control(p)) { return _control_port_color; - } else if (p->is_a(uris.atom_AtomPort)) { + } + + if (p->is_a(uris.atom_AtomPort)) { return _event_port_color; } |