From 69969efdecf3094b04d5700a016cddb7aea77133 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 20:28:44 +0100 Subject: Cleanup: Remove potentially redundant store --- src/server/InputPort.cpp | 10 ++++------ 1 file 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; } -- cgit v1.2.1