summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 17:57:57 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:42:51 +0100
commitb04fa862a1daeabd0a60a479cb5e3cacac4c94b2 (patch)
tree39544d105c5a0087aef8984599680be094480d91 /src/AlsaDriver.cpp
parent1be7c1b92c06880cf21f79cfa5419240f14e4fa4 (diff)
downloadpatchage-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.cpp19
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;
}