juce_AudioFormatManager.cpp(43): error C2059: syntax error: '}'

Don’t know why, but i get this error in VS2015, latest develop tip

modules\juce_audio_formats\format/juce_AudioFormatManager.cpp(43): error C2059: syntax error: '}'

after i added these brackets, the compiler was satisfied

 #if JUCE_DEBUG
        for (auto* af : knownFormats)
		{ // <- new
	        if (af->getFormatName() == newFormat->getFormatName())
                jassertfalse; // trying to add the same format twice!
		} // <- new
  #endif

I had this issue just yesterday and noticed a cleaning and rebuilding fixed it.

It’s a VS2015 compiler bug. We’ve hit it before, but it’s hard to remember to avoid it…

Another reason to avoid raw loops, I guess. :wink: