Browse Source

Plug-ins: Added an assertion to check that no two parameters have the same id

tags/2021-05-28
hogliux 8 years ago
parent
commit
307d515f4b
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      modules/juce_audio_processors/processors/juce_AudioProcessor.cpp

+ 8
- 0
modules/juce_audio_processors/processors/juce_AudioProcessor.cpp View File

@@ -682,6 +682,14 @@ void AudioProcessor::addParameter (AudioProcessorParameter* p)
// if you're using parameter objects, then you must not override the
// deprecated getNumParameters() method!
jassert (getNumParameters() == AudioProcessor::getNumParameters());
// check that no two parameters have the same id
#ifdef JUCE_DEBUG
auto paramId = getParameterID (p->parameterIndex);
for (auto q : managedParameters)
jassert (q == nullptr || q == p || paramId != getParameterID (q->parameterIndex));
#endif
}
void AudioProcessor::suspendProcessing (const bool shouldBeSuspended)


Loading…
Cancel
Save