diff options
author | David Robillard <d@drobilla.net> | 2020-11-27 17:57:57 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-27 21:42:51 +0100 |
commit | b04fa862a1daeabd0a60a479cb5e3cacac4c94b2 (patch) | |
tree | 39544d105c5a0087aef8984599680be094480d91 /src/AlsaDriver.cpp | |
parent | 1be7c1b92c06880cf21f79cfa5419240f14e4fa4 (diff) | |
download | patchage-b04fa862a1daeabd0a60a479cb5e3cacac4c94b2.tar.gz patchage-b04fa862a1daeabd0a60a479cb5e3cacac4c94b2.tar.bz2 patchage-b04fa862a1daeabd0a60a479cb5e3cacac4c94b2.zip |
Don't use else after return
I don't always agree with this one, but in this case it's reasonable enough.
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r-- | src/AlsaDriver.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 0ac2dc2..9f7b93b 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -200,7 +200,9 @@ AlsaDriver::find_module(uint8_t client_id, ModuleType type) ++j) { if (j->second->type() == type) { return j->second; - } else if (j->second->type() == ModuleType::input_output) { + } + + if (j->second->type() == ModuleType::input_output) { io_module = j->second; } } @@ -357,14 +359,17 @@ AlsaDriver::ignore(const snd_seq_addr_t& addr, bool add) if (caps & SND_SEQ_PORT_CAP_NO_EXPORT) { _ignored.insert(addr); return true; - } else if (!((caps & SND_SEQ_PORT_CAP_READ) || - (caps & SND_SEQ_PORT_CAP_WRITE) || - (caps & SND_SEQ_PORT_CAP_DUPLEX))) { + } + + if (!((caps & SND_SEQ_PORT_CAP_READ) || (caps & SND_SEQ_PORT_CAP_WRITE) || + (caps & SND_SEQ_PORT_CAP_DUPLEX))) { _ignored.insert(addr); return true; - } else if ((snd_seq_client_info_get_type(cinfo) != SND_SEQ_USER_CLIENT) && - ((type == SND_SEQ_PORT_SYSTEM_TIMER || - type == SND_SEQ_PORT_SYSTEM_ANNOUNCE))) { + } + + if ((snd_seq_client_info_get_type(cinfo) != SND_SEQ_USER_CLIENT) && + ((type == SND_SEQ_PORT_SYSTEM_TIMER || + type == SND_SEQ_PORT_SYSTEM_ANNOUNCE))) { _ignored.insert(addr); return true; } |