Hello JUCE team. Will y'all be disabling of fixing all of the warnings in the JUCE code for Visual Studio 2015? There was around 200 last time I compiled. It makes it hard to know when I'm getting warnings in my own code. VS2015 comes out in 2 days (July 20th), so I'm sure a lot of other people will be using it too.
You are not alone...
Keep it simple for yourself and just disable the warning for your whole solution/project. It seriously hasnt done any harm except become an eye irritant.
VS2015 is the first at being zanily pedantic about shadowing with its brand new set of warnings. If they were truly problematic, something would have come up long before they were brought in.
Yes, we are in the process of fixing all those warnings. Please be patient, this will be done soon.
Awesome! Thank you for letting us know. There is quite a lot of warnings. I figure that would take a while to fix.
By the way, I back y'all for providing the new tutorials. That'll be great for people getting started. Also, it's nice to see a new version of JUCE come out. Are there anything new from the latest commits on GitHub?
Fixing the warning themselves are fairly trivial, it's making sure that we haven't broken anything in the process that's delaying it!
Since these were variable shadowing warnings, if one of the references to the old name isn't updated, it'll refer to the shadowed variable now instance and compile just fine, whilst breaking anything that uses it.
So, know that we are working on it, and the only reason for the delay is that we want to make sure that we don't break your software! :)
That is why long time ago i started to adopt trailing underscores for member variables ( http://stackoverflow.com/questions/3650623/trailing-underscores-for-member-variables-in-c ). I'm pretty happy of that choice at early stage. ;-)
I just pushed all the compiler warning fixes for Visual Studio 2015. Please update to the newest tip!
By the way, I was testing it with the new VS2015 release from a few days ago, and not with the earlier RC version. You may still get some warnings with the RC, in this case please just update Visual Studio.
Awesome! Thank you very much! All of the warnings have gone away. JUCE Demo had like 1200 I believe. Ha.
There are still C4458 warnings in the examples (Plugin Host).
BTW - I find it odd that VS 2015 gives these warnings for a local variable which has the same name as a private base class member variable… I could understand if the base member variable were protected or public…
Yeah, it seems strange that all the compilers suddenly warn about this stuff, when in the past none of them seemed to care!
We'll stamp on any warnings we see, of course. The demos are a bit less of a priority as we often allow a few warnings in demo code if it makes it more readable for a beginner.
Yeah, I don't like hungarian notation. But two that I have stuck with are prepending "p" to pointers and "m_" to member variables. For everything else I let the IDE tell me the type.
A few I’m seeing in the JUCE code:
\modules\juce_audio_plugin_client\VST\juce_VST_Wrapper.cpp(1377): warning C4458: declaration of ‘editor’ hides class member
\modules\juce_audio_plugin_client\VST3\juce_VST3_Wrapper.cpp(207): warning C4458: declaration of ‘valueNormalized’ hides class member
\modules\juce_audio_plugin_client\VST3\juce_VST3_Wrapper.cpp(463): warning C4458: declaration of ‘rect’ hides class member
\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(898): warning C4458: declaration of ‘sampleRate’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)
\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(989): warning C4458: declaration of ‘playHead’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)
\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(2092): warning C4458: declaration of ‘reentrant’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)
Thanks! Fixed in latest tip!