summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}