summaryrefslogtreecommitdiffstats
path: root/src/server/BlockImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/BlockImpl.cpp')
-rw-r--r--src/server/BlockImpl.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 31f66c7b..b4f407c3 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -28,15 +28,12 @@
#include <raul/Array.hpp>
#include <raul/Symbol.hpp>
+#include <algorithm>
#include <cassert>
#include <cstdint>
#include <initializer_list>
#include <string>
-namespace ingen {
-class Resource;
-} // namespace ingen
-
namespace ingen::server {
BlockImpl::BlockImpl(PluginImpl* plugin,
@@ -249,9 +246,7 @@ BlockImpl::process(RunContext& ctx)
if (port->type() == PortType::CONTROL && port->is_input()) {
const SampleCount o = port->next_value_offset(
offset, ctx.nframes());
- if (o < chunk_end) {
- chunk_end = o;
- }
+ chunk_end = std::min(o, chunk_end);
}
}