From fd7b339e04f8de35cb5c74121b7a0da22600f216 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 14 Aug 2018 10:54:59 +0100 Subject: [PATCH] Moved some VST version compiler warnings out of juce_CheckSettingMacros.h and into the VST wrapper so that JUCE_COMPILER_WARNING can be used --- .../VST/juce_VST_Wrapper.cpp | 22 +++++++++++++++ .../utility/juce_CheckSettingMacros.h | 27 ------------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index a178aa2608..ac1b7fc30e 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -36,6 +36,28 @@ #include "../utility/juce_IncludeSystemHeaders.h" #include +#if JucePlugin_VersionCode < 0x010000 // Major < 0 + + #if (JucePlugin_VersionCode & 0x00FF00) > (9 * 0x100) // check if Minor number exceeeds 9 + JUCE_COMPILER_WARNING ("When version has 'major' = 0, VST2 has trouble displaying 'minor' exceeding 9") + #endif + + #if (JucePlugin_VersionCode & 0xFF) > 9 // check if Bugfix number exceeeds 9 + JUCE_COMPILER_WARNING ("When version has 'major' = 0, VST2 has trouble displaying 'bugfix' exceeding 9") + #endif + +#elif JucePlugin_VersionCode >= 0x650000 // Major >= 101 + + #if (JucePlugin_VersionCode & 0x00FF00) > (99 * 0x100) // check if Minor number exceeeds 99 + JUCE_COMPILER_WARNING ("When version has 'major' > 100, VST2 has trouble displaying 'minor' exceeding 99") + #endif + + #if (JucePlugin_VersionCode & 0xFF) > 99 // check if Bugfix number exceeeds 99 + JUCE_COMPILER_WARNING ("When version has 'major' > 100, VST2 has trouble displaying 'bugfix' exceeding 99") + #endif + +#endif + #ifdef PRAGMA_ALIGN_SUPPORTED #undef PRAGMA_ALIGN_SUPPORTED #define PRAGMA_ALIGN_SUPPORTED 1 diff --git a/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h b/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h index f409687461..b5278b1756 100644 --- a/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h +++ b/modules/juce_audio_plugin_client/utility/juce_CheckSettingMacros.h @@ -92,30 +92,3 @@ #undef JucePlugin_Build_AAX #define JucePlugin_Build_AAX 0 #endif - -//============================================================================== -#if JucePlugin_Build_VST - - #if JucePlugin_VersionCode < 0x010000 // Major < 0 - - #if (JucePlugin_VersionCode & 0x00FF00) > (9 * 0x100) // check if Minor number exceeeds 9 - #warning When version has "major" = 0, VST2 has trouble displaying "minor" exceeding 9 - #endif - - #if (JucePlugin_VersionCode & 0xFF) > 9 // check if Bugfix number exceeeds 9 - #warning When version has "major" = 0, VST2 has trouble displaying "bugfix" exceeding 9 - #endif - - #elif JucePlugin_VersionCode >= 0x650000 // Major >= 101 - - #if (JucePlugin_VersionCode & 0x00FF00) > (99 * 0x100) // check if Minor number exceeeds 99 - #warning When version has "major" > 100, VST2 has trouble displaying "minor" exceeding 99 - #endif - - #if (JucePlugin_VersionCode & 0xFF) > 99 // check if Bugfix number exceeeds 99 - #warning When version has "major" > 100, VST2 has trouble displaying "bugfix" exceeding 99 - #endif - - #endif // JucePlugin_VersionCode - -#endif // JucePlugin_Build_VST