From ebac8356738f21fe6e094cfc3c475fb1bcd7f141 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 10 Mar 2022 20:56:33 +0000 Subject: [PATCH] Fix some deprecation warnings --- examples/Plugins/SamplerPluginDemo.h | 7 +++++++ modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h | 1 - .../juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 4 +++- .../format_types/juce_AudioUnitPluginFormat.mm | 2 +- modules/juce_core/containers/juce_ElementComparator.h | 2 ++ modules/juce_core/network/juce_URL.h | 3 --- modules/juce_dsp/containers/juce_SIMDRegister.h | 3 --- .../contexts/juce_LowLevelGraphicsPostScriptRenderer.h | 1 + modules/juce_gui_basics/desktop/juce_Displays.h | 2 -- modules/juce_gui_basics/drawables/juce_SVGParser.cpp | 1 + 10 files changed, 15 insertions(+), 11 deletions(-) diff --git a/examples/Plugins/SamplerPluginDemo.h b/examples/Plugins/SamplerPluginDemo.h index b74b0106c7..ad70911734 100644 --- a/examples/Plugins/SamplerPluginDemo.h +++ b/examples/Plugins/SamplerPluginDemo.h @@ -551,7 +551,14 @@ inline std::unique_ptr makeAudioFormatReader (AudioFormatMana class AudioFormatReaderFactory { public: + AudioFormatReaderFactory() = default; + AudioFormatReaderFactory (const AudioFormatReaderFactory&) = default; + AudioFormatReaderFactory (AudioFormatReaderFactory&&) = default; + AudioFormatReaderFactory& operator= (const AudioFormatReaderFactory&) = default; + AudioFormatReaderFactory& operator= (AudioFormatReaderFactory&&) = default; + virtual ~AudioFormatReaderFactory() noexcept = default; + virtual std::unique_ptr make (AudioFormatManager&) const = 0; virtual std::unique_ptr clone() const = 0; }; diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h index 3da24ce730..d865695bb2 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h @@ -41,7 +41,6 @@ struct MPEZone enum class Type { lower, upper }; MPEZone() = default; - MPEZone (const MPEZone& other) = default; MPEZone (Type type, int memberChannels = 0, int perNotePitchbend = 48, int masterPitchbend = 2) : zoneType (type), diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 8ab3be7e59..e65c66701d 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -3492,7 +3492,9 @@ private: struct LockedVSTComSmartPtr { LockedVSTComSmartPtr() = default; - LockedVSTComSmartPtr (const VSTComSmartPtr& ptrIn) : ptr (ptrIn) {} + LockedVSTComSmartPtr (const VSTComSmartPtr& ptrIn) : ptr (ptrIn) {} + LockedVSTComSmartPtr (const LockedVSTComSmartPtr&) = default; + LockedVSTComSmartPtr& operator= (const LockedVSTComSmartPtr&) = default; ~LockedVSTComSmartPtr() { diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 8389dd6c65..2eaa9da0a7 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -823,7 +823,7 @@ public: layoutHasChanged = true; err = AudioUnitSetProperty (audioUnit, kAudioUnitProperty_ElementCount, scope, 0, &newCount, sizeof (newCount)); - jassert (err == noErr); + jassertquiet (err == noErr); } for (int i = 0; i < n; ++i) diff --git a/modules/juce_core/containers/juce_ElementComparator.h b/modules/juce_core/containers/juce_ElementComparator.h index 3346730f66..26c6118e37 100644 --- a/modules/juce_core/containers/juce_ElementComparator.h +++ b/modules/juce_core/containers/juce_ElementComparator.h @@ -35,12 +35,14 @@ template struct SortFunctionConverter { SortFunctionConverter (ElementComparator& e) : comparator (e) {} + SortFunctionConverter (const SortFunctionConverter&) = default; template bool operator() (Type a, Type b) { return comparator.compareElements (a, b) < 0; } private: ElementComparator& comparator; + SortFunctionConverter& operator= (const SortFunctionConverter&) = delete; }; diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index 7908ed26f4..70c9de7757 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -52,9 +52,6 @@ public: /** Creates URL referring to a local file on your disk using the file:// scheme. */ explicit URL (File localFile); - /** Destructor. */ - ~URL() = default; - /** Compares two URLs. All aspects of the URLs must be identical for them to match, including any parameters, diff --git a/modules/juce_dsp/containers/juce_SIMDRegister.h b/modules/juce_dsp/containers/juce_SIMDRegister.h index ea71c4ffd6..fe35360338 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister.h @@ -116,9 +116,6 @@ struct SIMDRegister /** Constructs an object from a scalar type by broadcasting it to all elements. */ inline SIMDRegister (Type s) noexcept { *this = s; } - /** Destructor. */ - inline ~SIMDRegister() noexcept = default; - //============================================================================== /** Returns the number of elements in this vector. */ static constexpr size_t size() noexcept { return SIMDNumElements; } diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h index 5c4631c248..5f67afea07 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.h @@ -93,6 +93,7 @@ protected: struct SavedState { SavedState(); + SavedState (const SavedState&) = default; SavedState& operator= (const SavedState&) = delete; RectangleList clip; diff --git a/modules/juce_gui_basics/desktop/juce_Displays.h b/modules/juce_gui_basics/desktop/juce_Displays.h index 6bdc71e71d..ab0c086471 100644 --- a/modules/juce_gui_basics/desktop/juce_Displays.h +++ b/modules/juce_gui_basics/desktop/juce_Displays.h @@ -166,8 +166,6 @@ public: #ifndef DOXYGEN /** @internal */ void refresh(); - /** @internal */ - ~Displays() = default; [[deprecated ("Use the getDisplayForPoint or getDisplayForRect methods instead " "as they can deal with converting between logical and physical pixels.")]] diff --git a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp index caaacbfede..f4c355dd43 100644 --- a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp +++ b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp @@ -1748,6 +1748,7 @@ private: deltaAngle = fmod (deltaAngle, MathConstants::twoPi); } + SVGState (const SVGState&) = default; SVGState& operator= (const SVGState&) = delete; };