summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 20:28:44 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 21:08:39 +0100
commit69969efdecf3094b04d5700a016cddb7aea77133 (patch)
tree972c10df5b7cd39762fd014e52960988c6af2206 /src/server
parent9e668eedf135962ca121285d0db148c47784e298 (diff)
downloadingen-69969efdecf3094b04d5700a016cddb7aea77133.tar.gz
ingen-69969efdecf3094b04d5700a016cddb7aea77133.tar.bz2
ingen-69969efdecf3094b04d5700a016cddb7aea77133.zip
Cleanup: Remove potentially redundant store
Diffstat (limited to 'src/server')
-rw-r--r--src/server/InputPort.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index 43816e45..9d02fd99 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -57,14 +57,12 @@ InputPort::InputPort(BufferFactory& bufs,
}
bool
-InputPort::apply_poly(RunContext& context, uint32_t poly)
+InputPort::apply_poly(RunContext& context, const uint32_t poly)
{
- bool ret = PortImpl::apply_poly(context, poly);
- if (!ret) {
- poly = 1;
- }
+ const bool ret = PortImpl::apply_poly(context, poly);
- assert(_voices->size() >= poly);
+ (void)ret;
+ assert(_voices->size() >= (ret ? poly : 1));
return true;
}