From 3df2b31e681b43f5baeca7ed37f161d0ad9845de Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 8 Aug 2022 21:31:11 +0100 Subject: [PATCH] Fix a warning --- distrho/src/DistrhoPluginVST3.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp index fe9645d38..436946389 100644 --- a/distrho/src/DistrhoPluginVST3.cpp +++ b/distrho/src/DistrhoPluginVST3.cpp @@ -846,7 +846,7 @@ class PluginVst3 if (mediaType == V3_AUDIO) { - #if DISTRHO_PLUGIN_NUM_INPUTS > 0 || DISTRHO_PLUGIN_NUM_OUTPUTS > 0 + #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0 const uint32_t busId = static_cast(busIndex); if (busDirection == V3_INPUT) @@ -877,6 +877,11 @@ class PluginVst3 } return V3_OK; + + #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS == 0 + // unused + (void)state; + #endif } v3_result setActive(const bool active) @@ -2438,8 +2443,8 @@ class PluginVst3 if (port.groupId != kPortGroupNone) { - const std::vector::const_iterator end = visitedPortGroups.cend(); - if (std::find(visitedPortGroups.cbegin(), end, port.groupId) == end) + const std::vector::iterator end = visitedPortGroups.end(); + if (std::find(visitedPortGroups.begin(), end, port.groupId) == end) { visitedPortGroups.push_back(port.groupId); ++busInfo.groups; @@ -2462,8 +2467,8 @@ class PluginVst3 busInfo.sidechain = 1; uint32_t busIdForCV = 0; - const std::vector::const_iterator vpgStart = visitedPortGroups.cbegin(); - const std::vector::const_iterator vpgEnd = visitedPortGroups.cend(); + const std::vector::iterator vpgStart = visitedPortGroups.begin(); + const std::vector::iterator vpgEnd = visitedPortGroups.end(); for (uint32_t i=0; i