Build error in AudioProcessor::addParameter jassert() on windows


#1

I just grabbed the HEAD of master and tried to build the JUCE Demo using Visual Studio 2015.

I get an error on the jassert() on line 691:

for (auto q : managedParameters)
    jassert (q == nullptr || q == p || paramId != getParameterID (q->parameterIndex));

The error is:
1>c:\users\rob\documents\c74\juce\modules\juce_audio_processors\processors\juce_audioprocessor.cpp(691): error C2059: syntax error: '}'

I see that this assertion was added on May 26 in revision 307d515f and merged to master on May 30 in revision 810e11d9.

I’m not sure what’s wrong with it. If I expand the jassert macro by hand then it compiles fine. Or, if I change the for loop to wrap the jassert() statement inside curly braces it works okay too. Maybe there is some improvement to be made to the definition of jassert()?

Thanks,
Rob


5.0.2 projects have many errors
Syntax error in juce_audio_processor.cpp / 5.0.2?
JUCE Assertion failure in juce_AudioProcessor.cpp:691
#2

See this thread:

And this pull request:


#3

Ah, great! Sorry for the noise, I had searched but failed to find the prior post. :slight_smile: