From 6ff6acad71e9c6e8dacd68fb28a88fb6a52b7ce6 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Wed, 3 Feb 2021 19:25:24 +0100 Subject: [PATCH] Fix a clang-tidy problem --- src/sfizz/Synth.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index d9ecb85e..b82cb372 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -800,11 +800,8 @@ int Synth::getNumActiveVoices() const noexcept int activeVoices = static_cast(impl.voiceManager_.getNumActiveVoices()); // do not count overflow voices which are over limit - int resultVoices = activeVoices; - if (config::overflowVoiceMultiplier > 1) - resultVoices = std::min(impl.numVoices_, activeVoices); - - return resultVoices; + return (config::overflowVoiceMultiplier > 1) ? + std::min(impl.numVoices_, activeVoices) : activeVoices; } void Synth::setSamplesPerBlock(int samplesPerBlock) noexcept