Skip to content

Commit

Permalink
Fix a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Aug 8, 2022
1 parent 03700cb commit 3df2b31
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions distrho/src/DistrhoPluginVST3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(busIndex);

if (busDirection == V3_INPUT)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -2438,8 +2443,8 @@ class PluginVst3

if (port.groupId != kPortGroupNone)
{
const std::vector<uint32_t>::const_iterator end = visitedPortGroups.cend();
if (std::find(visitedPortGroups.cbegin(), end, port.groupId) == end)
const std::vector<uint32_t>::iterator end = visitedPortGroups.end();
if (std::find(visitedPortGroups.begin(), end, port.groupId) == end)
{
visitedPortGroups.push_back(port.groupId);
++busInfo.groups;
Expand All @@ -2462,8 +2467,8 @@ class PluginVst3
busInfo.sidechain = 1;

uint32_t busIdForCV = 0;
const std::vector<uint32_t>::const_iterator vpgStart = visitedPortGroups.cbegin();
const std::vector<uint32_t>::const_iterator vpgEnd = visitedPortGroups.cend();
const std::vector<uint32_t>::iterator vpgStart = visitedPortGroups.begin();
const std::vector<uint32_t>::iterator vpgEnd = visitedPortGroups.end();

for (uint32_t i=0; i<numPorts; ++i)
{
Expand Down

0 comments on commit 3df2b31

Please sign in to comment.