Skip to content

Commit 3df2b31

Browse files
committed
Fix a warning
1 parent 03700cb commit 3df2b31

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

distrho/src/DistrhoPluginVST3.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ class PluginVst3
846846

847847
if (mediaType == V3_AUDIO)
848848
{
849-
#if DISTRHO_PLUGIN_NUM_INPUTS > 0 || DISTRHO_PLUGIN_NUM_OUTPUTS > 0
849+
#if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0
850850
const uint32_t busId = static_cast<uint32_t>(busIndex);
851851

852852
if (busDirection == V3_INPUT)
@@ -877,6 +877,11 @@ class PluginVst3
877877
}
878878

879879
return V3_OK;
880+
881+
#if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS == 0
882+
// unused
883+
(void)state;
884+
#endif
880885
}
881886

882887
v3_result setActive(const bool active)
@@ -2438,8 +2443,8 @@ class PluginVst3
24382443

24392444
if (port.groupId != kPortGroupNone)
24402445
{
2441-
const std::vector<uint32_t>::const_iterator end = visitedPortGroups.cend();
2442-
if (std::find(visitedPortGroups.cbegin(), end, port.groupId) == end)
2446+
const std::vector<uint32_t>::iterator end = visitedPortGroups.end();
2447+
if (std::find(visitedPortGroups.begin(), end, port.groupId) == end)
24432448
{
24442449
visitedPortGroups.push_back(port.groupId);
24452450
++busInfo.groups;
@@ -2462,8 +2467,8 @@ class PluginVst3
24622467
busInfo.sidechain = 1;
24632468

24642469
uint32_t busIdForCV = 0;
2465-
const std::vector<uint32_t>::const_iterator vpgStart = visitedPortGroups.cbegin();
2466-
const std::vector<uint32_t>::const_iterator vpgEnd = visitedPortGroups.cend();
2470+
const std::vector<uint32_t>::iterator vpgStart = visitedPortGroups.begin();
2471+
const std::vector<uint32_t>::iterator vpgEnd = visitedPortGroups.end();
24672472

24682473
for (uint32_t i=0; i<numPorts; ++i)
24692474
{

0 commit comments

Comments
 (0)