| @@ -41,9 +41,16 @@ | |||
| #pragma clang diagnostic ignored "-Wnon-virtual-dtor" | |||
| #pragma clang diagnostic ignored "-Wsign-conversion" | |||
| #pragma clang diagnostic ignored "-Wextra-semi" | |||
| #pragma clang diagnostic ignored "-Wshift-sign-overflow" | |||
| #if __has_warning("-Wpragma-pack") | |||
| #pragma clang diagnostic ignored "-Wpragma-pack" | |||
| #endif | |||
| #if __has_warning("-Wzero-as-null-pointer-constant") | |||
| #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" | |||
| #endif | |||
| #if __has_warning("-Winconsistent-missing-destructor-override") | |||
| #pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override" | |||
| #endif | |||
| #endif | |||
| #ifdef _MSC_VER | |||
| @@ -455,8 +462,8 @@ namespace AAXClasses | |||
| public ModifierKeyProvider | |||
| { | |||
| public: | |||
| JuceAAX_GUI() {} | |||
| ~JuceAAX_GUI() { DeleteViewContainer(); } | |||
| JuceAAX_GUI() = default; | |||
| ~JuceAAX_GUI() override { DeleteViewContainer(); } | |||
| static AAX_IEffectGUI* AAX_CALLBACK Create() { return new JuceAAX_GUI(); } | |||
| @@ -580,7 +587,7 @@ namespace AAXClasses | |||
| ignoreUnused (fakeMouseGenerator); | |||
| } | |||
| ~ContentWrapperComponent() | |||
| ~ContentWrapperComponent() override | |||
| { | |||
| if (pluginEditor != nullptr) | |||
| { | |||
| @@ -681,7 +688,7 @@ namespace AAXClasses | |||
| activeProcessors.add (this); | |||
| } | |||
| ~JuceAAX_Processor() | |||
| ~JuceAAX_Processor() override | |||
| { | |||
| activeProcessors.removeAllInstancesOf (this); | |||
| } | |||
| @@ -33,7 +33,7 @@ | |||
| #define JUCE_SUPPORT_CARBON 0 | |||
| #endif | |||
| #ifdef __clang__ | |||
| #ifdef JUCE_CLANG | |||
| #pragma clang diagnostic push | |||
| #pragma clang diagnostic ignored "-Wshorten-64-to-32" | |||
| #pragma clang diagnostic ignored "-Wunused-parameter" | |||
| @@ -42,6 +42,13 @@ | |||
| #pragma clang diagnostic ignored "-Wconversion" | |||
| #pragma clang diagnostic ignored "-Woverloaded-virtual" | |||
| #pragma clang diagnostic ignored "-Wextra-semi" | |||
| #pragma clang diagnostic ignored "-Wcast-align" | |||
| #if __has_warning("-Wzero-as-null-pointer-constant") | |||
| #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" | |||
| #endif | |||
| #if __has_warning("-Wnullable-to-nonnull-conversion") | |||
| #pragma clang diagnostic ignored "-Wnullable-to-nonnull-conversion" | |||
| #endif | |||
| #endif | |||
| #include "../utility/juce_IncludeSystemHeaders.h" | |||
| @@ -69,7 +76,7 @@ | |||
| #include "CoreAudioUtilityClasses/AUCarbonViewBase.h" | |||
| #endif | |||
| #ifdef __clang__ | |||
| #ifdef JUCE_CLANG | |||
| #pragma clang diagnostic pop | |||
| #endif | |||
| @@ -179,7 +186,7 @@ public: | |||
| jassertfalse; | |||
| } | |||
| ~JuceAU() | |||
| ~JuceAU() override | |||
| { | |||
| if (bypassParam != nullptr) | |||
| bypassParam->removeListener (this); | |||
| @@ -726,7 +733,7 @@ public: | |||
| if (juceFilter != nullptr) | |||
| { | |||
| CFDictionaryRef dict = (CFDictionaryRef) inData; | |||
| CFDataRef data = 0; | |||
| CFDataRef data = nullptr; | |||
| CFStringRef key = CFStringCreateWithCString (kCFAllocatorDefault, JUCE_STATE_DICTIONARY_KEY, kCFStringEncodingUTF8); | |||
| @@ -735,7 +742,7 @@ public: | |||
| if (valuePresent) | |||
| { | |||
| if (data != 0) | |||
| if (data != nullptr) | |||
| { | |||
| const int numBytes = (int) CFDataGetLength (data); | |||
| const juce::uint8* const rawBytes = CFDataGetBytePtr (data); | |||
| @@ -968,10 +975,10 @@ public: | |||
| if (auto* valueStrings = parameterValueStringArrays[index]) | |||
| { | |||
| *outStrings = CFArrayCreate (NULL, | |||
| *outStrings = CFArrayCreate (nullptr, | |||
| (const void **) valueStrings->getRawDataPointer(), | |||
| valueStrings->size(), | |||
| NULL); | |||
| nullptr); | |||
| return noErr; | |||
| } | |||
| @@ -1129,7 +1136,7 @@ public: | |||
| { | |||
| auEvent.mEventType = type; | |||
| auEvent.mArgument.mParameter.mParameterID = getAUParameterIDForIndex (juceParamIndex); | |||
| AUEventListenerNotify (0, 0, &auEvent); | |||
| AUEventListenerNotify (nullptr, nullptr, &auEvent); | |||
| } | |||
| void audioProcessorParameterChanged (AudioProcessor*, int index, float /*newValue*/) override | |||
| @@ -1402,7 +1409,7 @@ public: | |||
| clearPresetsArray(); | |||
| presetsArray.insertMultiple (0, AUPreset(), numPrograms); | |||
| CFMutableArrayRef presetsArrayRef = CFArrayCreateMutable (0, numPrograms, 0); | |||
| CFMutableArrayRef presetsArrayRef = CFArrayCreateMutable (nullptr, numPrograms, nullptr); | |||
| for (int i = 0; i < numPrograms; ++i) | |||
| { | |||
| @@ -1478,7 +1485,7 @@ public: | |||
| setBounds (getSizeToContainChild()); | |||
| } | |||
| ~EditorCompHolder() | |||
| ~EditorCompHolder() override | |||
| { | |||
| deleteAllChildren(); // note that we can't use a std::unique_ptr because the editor may | |||
| // have been transferred to another parent which takes over ownership. | |||
| @@ -1564,7 +1571,7 @@ public: | |||
| NSWindow* hostWindow = [hostView window]; | |||
| [hostWindow makeFirstResponder: hostView]; | |||
| [hostView keyDown: [NSApp currentEvent]]; | |||
| [hostView keyDown: (NSEvent*) [NSApp currentEvent]]; | |||
| [hostWindow makeFirstResponder: view]; | |||
| } | |||
| } | |||
| @@ -1976,7 +1983,7 @@ private: | |||
| #if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS | |||
| // studio one doesn't like negative parameters | |||
| paramHash &= ~(1 << (sizeof (AudioUnitParameterID) * 8 - 1)); | |||
| paramHash &= ~(((AudioUnitParameterID) 1) << (sizeof (AudioUnitParameterID) * 8 - 1)); | |||
| #endif | |||
| return forceUseLegacyParamIDs ? static_cast<AudioUnitParameterID> (juceParamID.getIntValue()) | |||
| @@ -2487,7 +2494,19 @@ JUCE_FACTORY_ENTRY (JuceAU, JucePlugin_AUExportPrefix) | |||
| #endif | |||
| #if ! JUCE_DISABLE_AU_FACTORY_ENTRY | |||
| #ifdef JUCE_CLANG | |||
| #pragma clang diagnostic push | |||
| #pragma clang diagnostic ignored "-Wcast-align" | |||
| #if __has_warning("-Wzero-as-null-pointer-constant") | |||
| #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" | |||
| #endif | |||
| #endif | |||
| #include "CoreAudioUtilityClasses/AUPlugInDispatch.cpp" | |||
| #ifdef JUCE_CLANG | |||
| #pragma clang diagnostic push | |||
| #endif | |||
| #endif | |||
| #endif | |||
| @@ -131,7 +131,7 @@ public: | |||
| initialiseJuce_GUI(); | |||
| } | |||
| virtual ~JuceAudioUnitv3Base() {} | |||
| virtual ~JuceAudioUnitv3Base() = default; | |||
| //============================================================================== | |||
| AUAudioUnit* getAudioUnit() noexcept { return au; } | |||
| @@ -441,7 +441,7 @@ public: | |||
| init(); | |||
| } | |||
| ~JuceAudioUnitv3() | |||
| ~JuceAudioUnitv3() override | |||
| { | |||
| auto& processor = getAudioProcessor(); | |||
| processor.removeListener (this); | |||
| @@ -1339,7 +1339,7 @@ public: | |||
| #endif | |||
| #if JUCE_LINUX | |||
| hostWindow = 0; | |||
| hostWindow = {}; | |||
| #endif | |||
| } | |||
| @@ -309,7 +309,7 @@ private: | |||
| #if JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS | |||
| // studio one doesn't like negative parameters | |||
| paramHash &= ~(1 << (sizeof (Vst::ParamID) * 8 - 1)); | |||
| paramHash &= ~(((Vst::ParamID) 1) << (sizeof (Vst::ParamID) * 8 - 1)); | |||
| #endif | |||
| return paramHash; | |||
| @@ -454,7 +454,7 @@ public: | |||
| valueNormalized = info.defaultNormalizedValue; | |||
| } | |||
| virtual ~Param() {} | |||
| virtual ~Param() override = default; | |||
| bool setNormalized (Vst::ParamValue v) override | |||
| { | |||
| @@ -537,7 +537,7 @@ public: | |||
| info.flags = Vst::ParameterInfo::kIsProgramChange | Vst::ParameterInfo::kCanAutomate; | |||
| } | |||
| virtual ~ProgramChangeParameter() {} | |||
| virtual ~ProgramChangeParameter() override = default; | |||
| bool setNormalized (Vst::ParamValue v) override | |||
| { | |||
| @@ -991,7 +991,7 @@ private: | |||
| parameterToMidiController[p].ctrlNumber = i; | |||
| parameters.addParameter (new Vst::Parameter (toString ("MIDI CC " + String (c) + "|" + String (i)), | |||
| static_cast<Vst::ParamID> (p) + parameterToMidiControllerOffset, 0, 0, 0, | |||
| static_cast<Vst::ParamID> (p) + parameterToMidiControllerOffset, nullptr, 0, 0, | |||
| 0, Vst::kRootUnitId)); | |||
| } | |||
| } | |||
| @@ -1342,7 +1342,7 @@ private: | |||
| ignoreUnused (fakeMouseGenerator); | |||
| } | |||
| ~ContentWrapperComponent() | |||
| ~ContentWrapperComponent() override | |||
| { | |||
| if (pluginEditor != nullptr) | |||
| { | |||
| @@ -1573,7 +1573,7 @@ public: | |||
| pluginInstance->setPlayHead (this); | |||
| } | |||
| ~JuceVST3Component() | |||
| ~JuceVST3Component() override | |||
| { | |||
| if (juceVST3EditController != nullptr) | |||
| juceVST3EditController->vst3IsPlaying = 0; | |||
| @@ -35,6 +35,14 @@ | |||
| #pragma clang diagnostic ignored "-Wextra-semi" | |||
| #pragma clang diagnostic ignored "-Wformat-pedantic" | |||
| #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" | |||
| #pragma clang diagnostic ignored "-Wshadow-all" | |||
| #pragma clang diagnostic ignored "-Wcast-align" | |||
| #if __has_warning("-Wzero-as-null-pointer-constant") | |||
| #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" | |||
| #endif | |||
| #if __has_warning("-Wnullable-to-nonnull-conversion") | |||
| #pragma clang diagnostic ignored "-Wnullable-to-nonnull-conversion" | |||
| #endif | |||
| #endif | |||
| // From MacOS 10.13 and iOS 11 Apple has (sensibly!) stopped defining a whole | |||