From a234721110b8e7bbc253c34d1d3a71b397e0d919 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 31 Jan 2019 15:15:31 +0000 Subject: [PATCH] Added various clang-tidy modernize-* fixes --- .../juce_analytics/analytics/juce_Analytics.h | 2 +- .../destinations/juce_AnalyticsDestination.h | 2 +- .../audio_play_head/juce_AudioPlayHead.h | 4 +-- .../buffers/juce_AudioChannelSet.h | 2 +- .../buffers/juce_AudioDataConverters.h | 12 +++---- .../buffers/juce_AudioSampleBuffer.h | 2 +- .../midi/juce_MidiKeyboardState.h | 4 +-- .../mpe/juce_MPEInstrument.h | 5 ++- .../mpe/juce_MPEZoneLayout.h | 10 ++---- .../sources/juce_AudioSource.h | 8 ++--- .../sources/juce_PositionableAudioSource.h | 4 +-- .../synthesisers/juce_Synthesiser.h | 2 +- .../utilities/juce_LinearSmoothedValue.h | 4 +-- .../juce_audio_basics/utilities/juce_Reverb.h | 33 +++++++------------ .../audio_io/juce_AudioDeviceManager.h | 2 +- .../audio_io/juce_AudioIODevice.h | 2 +- .../audio_io/juce_AudioIODeviceType.h | 2 +- .../midi_io/juce_MidiInput.h | 2 +- .../format/juce_AudioFormatWriter.h | 4 +-- .../VST/juce_VSTCallbackHandler.h | 2 +- .../utility/juce_PluginHostType.h | 4 +-- .../format/juce_AudioPluginFormat.h | 2 +- .../processors/juce_AudioPluginInstance.h | 4 +-- .../processors/juce_AudioProcessorListener.h | 2 +- .../processors/juce_AudioProcessorParameter.h | 2 +- .../scanning/juce_KnownPluginList.h | 2 +- .../gui/juce_AudioAppComponent.h | 8 ++--- .../gui/juce_AudioThumbnailBase.h | 4 +-- .../juce_blocks_basics/blocks/juce_Block.h | 8 ++--- .../juce_blocks_basics/blocks/juce_LEDGrid.h | 8 ++--- .../blocks/juce_TouchList.h | 4 +-- .../littlefoot/juce_LittleFootCompiler.h | 6 ++-- .../littlefoot/juce_LittleFootRunner.h | 8 ++--- .../protocol/juce_BitPackingUtilities.h | 6 ++-- .../topology/juce_PhysicalTopologySource.h | 2 +- .../topology/juce_RuleBasedTopologySource.h | 4 +-- .../topology/juce_TopologySource.h | 4 +-- .../containers/juce_ArrayAllocationBase.h | 8 ++--- .../juce_core/containers/juce_DynamicObject.h | 2 +- modules/juce_core/containers/juce_HashMap.h | 4 +-- .../juce_core/containers/juce_ListenerList.h | 6 ++-- modules/juce_core/containers/juce_SortedSet.h | 4 +-- modules/juce_core/containers/juce_SparseSet.h | 2 +- modules/juce_core/files/juce_File.h | 4 +-- modules/juce_core/maths/juce_Expression.h | 2 +- .../juce_core/maths/juce_NormalisableRange.h | 2 +- modules/juce_core/memory/juce_HeapBlock.h | 4 +-- .../juce_HeavyweightLeakedObjectDetector.h | 2 +- .../memory/juce_LeakedObjectDetector.h | 2 +- .../memory/juce_OptionalScopedPointer.h | 4 +-- .../memory/juce_ReferenceCountedObject.h | 6 ++-- modules/juce_core/memory/juce_ScopedPointer.h | 2 +- modules/juce_core/memory/juce_Singleton.h | 2 +- modules/juce_core/memory/juce_WeakReference.h | 4 +-- .../juce_core/network/juce_WebInputStream.h | 2 +- modules/juce_core/streams/juce_InputSource.h | 4 +-- modules/juce_core/streams/juce_InputStream.h | 4 +-- .../juce_core/text/juce_CharPointer_ASCII.h | 5 +-- .../juce_core/text/juce_CharPointer_UTF16.h | 5 +-- .../juce_core/text/juce_CharPointer_UTF32.h | 5 +-- .../juce_core/text/juce_CharPointer_UTF8.h | 5 +-- .../juce_core/threads/juce_CriticalSection.h | 4 +-- .../juce_core/threads/juce_DynamicLibrary.h | 2 +- modules/juce_core/threads/juce_SpinLock.h | 4 +-- modules/juce_core/threads/juce_Thread.h | 2 +- .../juce_core/threads/juce_ThreadLocalValue.h | 4 +-- modules/juce_core/threads/juce_ThreadPool.h | 2 +- .../juce_core/threads/juce_TimeSliceThread.h | 2 +- modules/juce_core/zip/juce_ZipFile.h | 2 +- .../undomanager/juce_UndoManager.h | 2 +- .../undomanager/juce_UndoableAction.h | 4 +-- .../values/juce_CachedValue.h | 2 +- .../juce_data_structures/values/juce_Value.h | 4 +-- .../values/juce_ValueTree.h | 2 +- .../values/juce_ValueWithDefault.h | 2 +- modules/juce_dsp/containers/juce_AudioBlock.h | 2 +- .../juce_dsp/containers/juce_SIMDRegister.h | 4 +-- modules/juce_dsp/maths/juce_LookupTable.h | 3 +- modules/juce_dsp/processors/juce_Bias.h | 2 +- modules/juce_dsp/processors/juce_Gain.h | 2 +- modules/juce_dsp/processors/juce_Oscillator.h | 3 +- modules/juce_dsp/processors/juce_Reverb.h | 3 +- .../broadcasters/juce_ActionListener.h | 2 +- .../broadcasters/juce_ChangeListener.h | 2 +- .../messages/juce_CallbackMessage.h | 6 ++-- .../messages/juce_MessageManager.h | 4 +-- .../juce_LowLevelGraphicsSoftwareRenderer.h | 2 +- .../effects/juce_ImageEffectFilter.h | 2 +- .../fonts/juce_AttributedString.h | 4 +-- modules/juce_graphics/fonts/juce_Typeface.h | 2 +- .../geometry/juce_RectangleList.h | 2 +- modules/juce_graphics/images/juce_Image.h | 8 ++--- .../images/juce_ImageFileFormat.h | 4 +-- .../native/juce_RenderingHelpers.h | 31 +++++++---------- modules/juce_gui_basics/buttons/juce_Button.h | 4 +-- .../buttons/juce_ImageButton.h | 2 +- .../commands/juce_ApplicationCommandID.h | 2 +- .../commands/juce_ApplicationCommandManager.h | 2 +- .../components/juce_CachedComponentImage.h | 4 +-- .../components/juce_Component.h | 4 +-- .../components/juce_ComponentListener.h | 2 +- .../components/juce_ModalComponentManager.h | 4 +-- .../juce_gui_basics/desktop/juce_Desktop.h | 2 +- .../juce_gui_basics/desktop/juce_Displays.h | 2 +- .../filebrowser/juce_FileBrowserComponent.h | 2 +- .../filebrowser/juce_FileChooser.h | 2 +- .../filebrowser/juce_FilePreviewComponent.h | 2 +- .../filebrowser/juce_FilenameComponent.h | 4 +-- .../keyboard/juce_KeyListener.h | 2 +- .../keyboard/juce_TextInputTarget.h | 4 +-- .../layout/juce_AnimatedPosition.h | 9 +++-- .../layout/juce_AnimatedPositionBehaviours.h | 10 ++---- .../layout/juce_ComponentBuilder.h | 4 +-- .../layout/juce_ConcertinaPanel.h | 2 +- .../layout/juce_GroupComponent.h | 2 +- .../juce_gui_basics/layout/juce_ScrollBar.h | 4 +-- .../juce_gui_basics/layout/juce_SidePanel.h | 2 +- .../layout/juce_StretchableLayoutResizerBar.h | 2 +- .../layout/juce_TabbedButtonBar.h | 2 +- .../lookandfeel/juce_LookAndFeel.h | 8 ++--- .../juce_gui_basics/menus/juce_MenuBarModel.h | 2 +- .../juce_gui_basics/menus/juce_PopupMenu.h | 6 ++-- .../misc/juce_BubbleComponent.h | 2 +- .../mouse/juce_DragAndDropTarget.h | 2 +- .../mouse/juce_FileDragAndDropTarget.h | 2 +- .../mouse/juce_LassoComponent.h | 4 +-- .../mouse/juce_MouseInactivityDetector.h | 2 +- .../mouse/juce_MouseListener.h | 2 +- .../mouse/juce_TextDragAndDropTarget.h | 2 +- .../mouse/juce_TooltipClient.h | 6 ++-- .../positioning/juce_MarkerList.h | 4 +-- .../positioning/juce_RelativePointPath.h | 8 ++--- .../properties/juce_PropertyComponent.h | 2 +- .../properties/juce_TextPropertyComponent.h | 2 +- .../juce_gui_basics/widgets/juce_ComboBox.h | 4 +-- modules/juce_gui_basics/widgets/juce_Label.h | 4 +-- .../juce_gui_basics/widgets/juce_ListBox.h | 2 +- .../widgets/juce_ProgressBar.h | 2 +- modules/juce_gui_basics/widgets/juce_Slider.h | 4 +-- .../widgets/juce_TableHeaderComponent.h | 6 ++-- .../widgets/juce_TableListBox.h | 4 +-- .../juce_gui_basics/widgets/juce_TextEditor.h | 8 ++--- .../juce_gui_basics/widgets/juce_Toolbar.h | 2 +- .../juce_gui_basics/widgets/juce_TreeView.h | 2 +- .../windows/juce_AlertWindow.h | 2 +- .../juce_gui_basics/windows/juce_CallOutBox.h | 2 +- .../windows/juce_ComponentPeer.h | 2 +- .../windows/juce_DocumentWindow.h | 2 +- .../windows/juce_ResizableWindow.h | 2 +- .../windows/juce_TooltipWindow.h | 2 +- .../code_editor/juce_CodeDocument.h | 4 +-- .../code_editor/juce_CodeTokeniser.h | 4 +-- .../documents/juce_FileBasedDocument.h | 2 +- .../misc/juce_PushNotifications.h | 4 +-- .../misc/juce_SystemTrayIconComponent.h | 2 +- .../juce_opengl/opengl/juce_OpenGLContext.h | 2 +- modules/juce_opengl/opengl/juce_OpenGLImage.h | 2 +- .../juce_opengl/opengl/juce_OpenGLRenderer.h | 4 +-- .../utils/juce_OpenGLAppComponent.h | 2 +- modules/juce_osc/osc/juce_OSCReceiver.h | 4 +-- .../marketplace/juce_OnlineUnlockForm.h | 2 +- .../juce_video/playback/juce_VideoComponent.h | 2 +- 162 files changed, 283 insertions(+), 338 deletions(-) diff --git a/modules/juce_analytics/analytics/juce_Analytics.h b/modules/juce_analytics/analytics/juce_Analytics.h index 562cbb931c..99a88a8b6a 100644 --- a/modules/juce_analytics/analytics/juce_Analytics.h +++ b/modules/juce_analytics/analytics/juce_Analytics.h @@ -102,7 +102,7 @@ public: private: //============================================================================== Analytics() = default; - ~Analytics() { clearSingletonInstance(); } + ~Analytics() override { clearSingletonInstance(); } String userId; StringPairArray userProperties; diff --git a/modules/juce_analytics/destinations/juce_AnalyticsDestination.h b/modules/juce_analytics/destinations/juce_AnalyticsDestination.h index e1938fe45d..d0855d8238 100644 --- a/modules/juce_analytics/destinations/juce_AnalyticsDestination.h +++ b/modules/juce_analytics/destinations/juce_AnalyticsDestination.h @@ -80,7 +80,7 @@ struct JUCE_API AnalyticsDestination AnalyticsDestination() = default; /** Destructor. */ - virtual ~AnalyticsDestination() {} + virtual ~AnalyticsDestination() = default; /** When an AnalyticsDestination is added to an Analytics object this method diff --git a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h index 8a58c7ba97..70f3a2b4e8 100644 --- a/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h +++ b/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h @@ -39,10 +39,10 @@ class JUCE_API AudioPlayHead { protected: //============================================================================== - AudioPlayHead() {} + AudioPlayHead() = default; public: - virtual ~AudioPlayHead() {} + virtual ~AudioPlayHead() = default; //============================================================================== /** Frame rate types. */ diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h index 614feaa5c4..e9985a18fa 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h @@ -49,7 +49,7 @@ public: /** Creates an empty channel set. You can call addChannel to add channels to the set. */ - AudioChannelSet() noexcept {} + AudioChannelSet() = default; /** Creates a zero-channel set which can be used to indicate that a bus is disabled. */ diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index 45c6c3099f..47edc642db 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -277,8 +277,8 @@ public: class NonInterleaved { public: - inline NonInterleaved() noexcept {} - inline NonInterleaved (const NonInterleaved&) noexcept {} + inline NonInterleaved() = default; + inline NonInterleaved (const NonInterleaved&) = default; inline NonInterleaved (const int) noexcept {} inline void copyFrom (const NonInterleaved&) noexcept {} template inline void advanceData (SampleFormatType& s) noexcept { s.advance(); } @@ -292,15 +292,15 @@ public: class Interleaved { public: - inline Interleaved() noexcept : numInterleavedChannels (1) {} - inline Interleaved (const Interleaved& other) noexcept : numInterleavedChannels (other.numInterleavedChannels) {} + inline Interleaved() noexcept {} + inline Interleaved (const Interleaved& other) = default; inline Interleaved (const int numInterleavedChans) noexcept : numInterleavedChannels (numInterleavedChans) {} inline void copyFrom (const Interleaved& other) noexcept { numInterleavedChannels = other.numInterleavedChannels; } template inline void advanceData (SampleFormatType& s) noexcept { s.skip (numInterleavedChannels); } template inline void advanceDataBy (SampleFormatType& s, int numSamples) noexcept { s.skip (numInterleavedChannels * numSamples); } template inline void clear (SampleFormatType& s, int numSamples) noexcept { while (--numSamples >= 0) { s.clear(); s.skip (numInterleavedChannels); } } template inline int getNumBytesBetweenSamples (const SampleFormatType&) const noexcept { return numInterleavedChannels * SampleFormatType::bytesPerSample; } - int numInterleavedChannels; + int numInterleavedChannels = 1; enum { isInterleavedType = 1 }; }; @@ -587,7 +587,7 @@ public: class Converter { public: - virtual ~Converter() {} + virtual ~Converter() = default; /** Converts a sequence of samples from the converter's source format into the dest format. */ virtual void convertSamples (void* destSamples, const void* sourceSamples, int numSamples) const = 0; diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index b95262cd61..9072ae97aa 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -172,7 +172,7 @@ public: /** Destructor. This will free any memory allocated by the buffer. */ - ~AudioBuffer() noexcept {} + ~AudioBuffer() = default; /** Move constructor */ AudioBuffer (AudioBuffer&& other) noexcept diff --git a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h index ddbbe2dba2..5b20bc570e 100644 --- a/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h +++ b/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h @@ -38,8 +38,8 @@ class JUCE_API MidiKeyboardStateListener { public: //============================================================================== - MidiKeyboardStateListener() noexcept {} - virtual ~MidiKeyboardStateListener() {} + MidiKeyboardStateListener() = default; + virtual ~MidiKeyboardStateListener() = default; //============================================================================== /** Called when one of the MidiKeyboardState's keys is pressed. diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h index 59b070bfef..436bb7b942 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.h +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.h @@ -241,7 +241,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Implement this callback to be informed whenever a new expressive MIDI note is triggered. @@ -352,8 +352,7 @@ private: struct MPEDimension { - MPEDimension() noexcept : trackingMode (lastNotePlayedOnChannel) {} - TrackingMode trackingMode; + TrackingMode trackingMode = lastNotePlayedOnChannel; MPEValue lastValueReceivedOnChannel[16]; MPEValue MPENote::* value; MPEValue& getValue (MPENote& note) noexcept { return note.*(value); } diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h index 1414324ce3..955deb37e4 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h @@ -80,13 +80,7 @@ public: */ struct Zone { - Zone (const Zone& other) noexcept - : numMemberChannels (other.numMemberChannels), - perNotePitchbendRange (other.perNotePitchbendRange), - masterPitchbendRange (other.masterPitchbendRange), - lowerZone (other.lowerZone) - { - } + Zone (const Zone& other) = default; bool isLowerZone() const noexcept { return lowerZone; } bool isUpperZone() const noexcept { return ! lowerZone; } @@ -185,7 +179,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Implement this callback to be notified about any changes to this MPEZoneLayout. Will be called whenever a zone is added, zones are diff --git a/modules/juce_audio_basics/sources/juce_AudioSource.h b/modules/juce_audio_basics/sources/juce_AudioSource.h index 9633f67b83..3b48ee0660 100644 --- a/modules/juce_audio_basics/sources/juce_AudioSource.h +++ b/modules/juce_audio_basics/sources/juce_AudioSource.h @@ -32,9 +32,7 @@ namespace juce struct JUCE_API AudioSourceChannelInfo { /** Creates an uninitialised AudioSourceChannelInfo. */ - AudioSourceChannelInfo() noexcept - { - } + AudioSourceChannelInfo() = default; /** Creates an AudioSourceChannelInfo. */ AudioSourceChannelInfo (AudioBuffer* bufferToUse, @@ -113,11 +111,11 @@ class JUCE_API AudioSource protected: //============================================================================== /** Creates an AudioSource. */ - AudioSource() noexcept {} + AudioSource() = default; public: /** Destructor. */ - virtual ~AudioSource() {} + virtual ~AudioSource() = default; //============================================================================== /** Tells the source to prepare for playing. diff --git a/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h b/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h index 610d2c5af4..df7ea36328 100644 --- a/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h @@ -40,11 +40,11 @@ class JUCE_API PositionableAudioSource : public AudioSource protected: //============================================================================== /** Creates the PositionableAudioSource. */ - PositionableAudioSource() noexcept {} + PositionableAudioSource() = default; public: /** Destructor */ - ~PositionableAudioSource() {} + ~PositionableAudioSource() override = default; //============================================================================== /** Tells the stream to move to a new position. diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index b4a180db23..cdff377885 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -46,7 +46,7 @@ protected: public: /** Destructor. */ - virtual ~SynthesiserSound(); + ~SynthesiserSound() override; //============================================================================== /** Returns true if this sound should be played when a given midi note is pressed. diff --git a/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h b/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h index e586f92e77..3087b07976 100644 --- a/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h +++ b/modules/juce_audio_basics/utilities/juce_LinearSmoothedValue.h @@ -35,9 +35,7 @@ class LinearSmoothedValue { public: /** Constructor. */ - LinearSmoothedValue() noexcept - { - } + LinearSmoothedValue() = default; /** Constructor. */ LinearSmoothedValue (FloatType initialValue) noexcept diff --git a/modules/juce_audio_basics/utilities/juce_Reverb.h b/modules/juce_audio_basics/utilities/juce_Reverb.h index aabcad8757..6244351e9d 100644 --- a/modules/juce_audio_basics/utilities/juce_Reverb.h +++ b/modules/juce_audio_basics/utilities/juce_Reverb.h @@ -49,22 +49,13 @@ public: /** Holds the parameters being used by a Reverb object. */ struct Parameters { - Parameters() noexcept - : roomSize (0.5f), - damping (0.5f), - wetLevel (0.33f), - dryLevel (0.4f), - width (1.0f), - freezeMode (0) - {} - - float roomSize; /**< Room size, 0 to 1.0, where 1.0 is big, 0 is small. */ - float damping; /**< Damping, 0 to 1.0, where 0 is not damped, 1.0 is fully damped. */ - float wetLevel; /**< Wet level, 0 to 1.0 */ - float dryLevel; /**< Dry level, 0 to 1.0 */ - float width; /**< Reverb width, 0 to 1.0, where 1.0 is very wide. */ - float freezeMode; /**< Freeze mode - values < 0.5 are "normal" mode, values > 0.5 - put the reverb into a continuous feedback loop. */ + float roomSize = 0.5f; /**< Room size, 0 to 1.0, where 1.0 is big, 0 is small. */ + float damping = 0.5f; /**< Damping, 0 to 1.0, where 0 is not damped, 1.0 is fully damped. */ + float wetLevel = 0.33f; /**< Wet level, 0 to 1.0 */ + float dryLevel = 0.4f; /**< Dry level, 0 to 1.0 */ + float width = 1.0f; /**< Reverb width, 0 to 1.0, where 1.0 is very wide. */ + float freezeMode = 0.0f; /**< Freeze mode - values < 0.5 are "normal" mode, values > 0.5 + put the reverb into a continuous feedback loop. */ }; //============================================================================== @@ -224,7 +215,7 @@ private: class CombFilter { public: - CombFilter() noexcept : bufferSize (0), bufferIndex (0), last (0) {} + CombFilter() noexcept {} void setSize (const int size) { @@ -259,8 +250,8 @@ private: private: HeapBlock buffer; - int bufferSize, bufferIndex; - float last; + int bufferSize = 0, bufferIndex = 0; + float last = 0.0f; JUCE_DECLARE_NON_COPYABLE (CombFilter) }; @@ -269,7 +260,7 @@ private: class AllPassFilter { public: - AllPassFilter() noexcept : bufferSize (0), bufferIndex (0) {} + AllPassFilter() noexcept {} void setSize (const int size) { @@ -300,7 +291,7 @@ private: private: HeapBlock buffer; - int bufferSize, bufferIndex; + int bufferSize = 0, bufferIndex = 0; JUCE_DECLARE_NON_COPYABLE (AllPassFilter) }; diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h index 419b065d94..8914dbcc0d 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h @@ -76,7 +76,7 @@ public: AudioDeviceManager(); /** Destructor. */ - ~AudioDeviceManager(); + ~AudioDeviceManager() override; //============================================================================== /** diff --git a/modules/juce_audio_devices/audio_io/juce_AudioIODevice.h b/modules/juce_audio_devices/audio_io/juce_AudioIODevice.h index 8367984235..d835dd62f6 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioIODevice.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioIODevice.h @@ -43,7 +43,7 @@ class JUCE_API AudioIODeviceCallback { public: /** Destructor. */ - virtual ~AudioIODeviceCallback() {} + virtual ~AudioIODeviceCallback() = default; /** Processes a block of incoming and outgoing audio data. diff --git a/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h b/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h index f7b3236f63..b778e6a26d 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h +++ b/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h @@ -126,7 +126,7 @@ public: class Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when the list of available audio devices changes. */ virtual void audioDeviceListChanged() = 0; diff --git a/modules/juce_audio_devices/midi_io/juce_MidiInput.h b/modules/juce_audio_devices/midi_io/juce_MidiInput.h index 792eadd3c1..49af5bfcde 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiInput.h +++ b/modules/juce_audio_devices/midi_io/juce_MidiInput.h @@ -41,7 +41,7 @@ class JUCE_API MidiInputCallback { public: /** Destructor. */ - virtual ~MidiInputCallback() {} + virtual ~MidiInputCallback() = default; /** Receives an incoming message. diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h index 16f699b295..6c9f18db60 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.h @@ -216,8 +216,8 @@ public: class JUCE_API IncomingDataReceiver { public: - IncomingDataReceiver() {} - virtual ~IncomingDataReceiver() {} + IncomingDataReceiver() = default; + virtual ~IncomingDataReceiver() = default; virtual void reset (int numChannels, double sampleRate, int64 totalSamplesInSource) = 0; virtual void addBlock (int64 sampleNumberInSource, const AudioBuffer& newData, diff --git a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h index 6ba0056360..62e08d92d9 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h +++ b/modules/juce_audio_plugin_client/VST/juce_VSTCallbackHandler.h @@ -34,7 +34,7 @@ namespace juce */ struct VSTCallbackHandler { - virtual ~VSTCallbackHandler() {} + virtual ~VSTCallbackHandler() = default; /** This is called by the VST plug-in wrapper when it receives unhandled plug-in "can do" calls from the host. diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h index 2e43c90d87..cef16ce7ff 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h +++ b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h @@ -41,8 +41,8 @@ class PluginHostType public: //============================================================================== PluginHostType() : type (getHostType()) {} - PluginHostType (const PluginHostType& other) noexcept : type (other.type) {} - PluginHostType& operator= (const PluginHostType& other) noexcept { type = other.type; return *this; } + PluginHostType (const PluginHostType& other) noexcept = default; + PluginHostType& operator= (const PluginHostType& other) noexcept = default; //============================================================================== /** Represents the host type and also its version for some hosts. */ diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h index f154704a11..3f00406163 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.h +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.h @@ -42,7 +42,7 @@ public: /** Structure used for callbacks when instantiation is completed. */ struct JUCE_API InstantiationCompletionCallback { - virtual ~InstantiationCompletionCallback() {} + virtual ~InstantiationCompletionCallback() = default; virtual void completionCallback (AudioPluginInstance* instance, const String& error) = 0; JUCE_LEAK_DETECTOR (InstantiationCompletionCallback) diff --git a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.h b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.h index 0eacdafcc5..20f7466bd0 100644 --- a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.h +++ b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.h @@ -59,7 +59,7 @@ public: Make sure that you delete any UI components that belong to this plugin before deleting the plugin. */ - ~AudioPluginInstance() override {} + ~AudioPluginInstance() override = default; //============================================================================== /** Fills-in the appropriate parts of this plugin description object. */ @@ -118,7 +118,7 @@ protected: StringArray onStrings, offStrings; }; - AudioPluginInstance() {} + AudioPluginInstance() = default; AudioPluginInstance (const BusesProperties& ioLayouts) : AudioProcessor (ioLayouts) {} template AudioPluginInstance (const short channelLayoutList[numLayouts][2]) : AudioProcessor (channelLayoutList) {} diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h index aac241c141..0ea8bbf5d9 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorListener.h @@ -42,7 +42,7 @@ class JUCE_API AudioProcessorListener public: //============================================================================== /** Destructor. */ - virtual ~AudioProcessorListener() {} + virtual ~AudioProcessorListener() = default; //============================================================================== /** Receives a callback when a parameter is changed. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h index a700098cfd..1d3b390077 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h @@ -238,7 +238,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Receives a callback when a parameter has been changed. diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.h b/modules/juce_audio_processors/scanning/juce_KnownPluginList.h index b34ade577c..13ca660892 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.h +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.h @@ -46,7 +46,7 @@ public: KnownPluginList(); /** Destructor. */ - ~KnownPluginList(); + ~KnownPluginList() override; //============================================================================== /** Clears the list. */ diff --git a/modules/juce_audio_utils/gui/juce_AudioAppComponent.h b/modules/juce_audio_utils/gui/juce_AudioAppComponent.h index 10789aadba..02bd03b0eb 100644 --- a/modules/juce_audio_utils/gui/juce_AudioAppComponent.h +++ b/modules/juce_audio_utils/gui/juce_AudioAppComponent.h @@ -52,7 +52,7 @@ public: AudioAppComponent(); AudioAppComponent (AudioDeviceManager&); - ~AudioAppComponent(); + ~AudioAppComponent() override; /** A subclass should call this from their constructor, to set up the audio. */ void setAudioChannels (int numInputChannels, int numOutputChannels, const XmlElement* const storedSettings = nullptr); @@ -84,7 +84,7 @@ public: @see releaseResources, getNextAudioBlock */ virtual void prepareToPlay (int samplesPerBlockExpected, - double sampleRate) = 0; + double sampleRate) override = 0; /** Allows the source to release anything it no longer needs after playback has stopped. @@ -98,7 +98,7 @@ public: @see prepareToPlay, getNextAudioBlock */ - virtual void releaseResources() = 0; + virtual void releaseResources() override = 0; /** Called repeatedly to fetch subsequent blocks of audio data. @@ -112,7 +112,7 @@ public: @see AudioSourceChannelInfo, prepareToPlay, releaseResources */ - virtual void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) = 0; + virtual void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override = 0; /** Shuts down the audio device and clears the audio source. diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnailBase.h b/modules/juce_audio_utils/gui/juce_AudioThumbnailBase.h index b4123096b9..56a5fa9d08 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnailBase.h +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnailBase.h @@ -46,8 +46,8 @@ class JUCE_API AudioThumbnailBase : public ChangeBroadcaster, { public: //============================================================================== - AudioThumbnailBase() {} - virtual ~AudioThumbnailBase() {} + AudioThumbnailBase() = default; + ~AudioThumbnailBase() override = default; //============================================================================== /** Clears and resets the thumbnail. */ diff --git a/modules/juce_blocks_basics/blocks/juce_Block.h b/modules/juce_blocks_basics/blocks/juce_Block.h index 48ec1127da..9b6fb71f4e 100644 --- a/modules/juce_blocks_basics/blocks/juce_Block.h +++ b/modules/juce_blocks_basics/blocks/juce_Block.h @@ -33,7 +33,7 @@ class Block : public juce::ReferenceCountedObject public: //============================================================================== /** Destructor. */ - virtual ~Block(); + ~Block() override; /** The different block types. @see Block::getType() @@ -263,7 +263,7 @@ public: /** Interface for objects listening to custom program events. */ struct ProgramEventListener { - virtual ~ProgramEventListener() {} + virtual ~ProgramEventListener() = default; /** Called whenever a message from a block is received. */ virtual void handleProgramEvent (Block& source, const ProgramEventMessage&) = 0; @@ -312,7 +312,7 @@ public: options }; - ConfigMetaData() {} + ConfigMetaData() = default; // Constructor to work around VS2015 bugs... ConfigMetaData (uint32 itemIndex, @@ -445,7 +445,7 @@ public: /** Interface for objects listening to input data port. */ struct DataInputPortListener { - virtual ~DataInputPortListener() {} + virtual ~DataInputPortListener() = default; /** Called whenever a message from a block is received. */ virtual void handleIncomingDataPortMessage (Block& source, const void* messageData, size_t messageSize) = 0; diff --git a/modules/juce_blocks_basics/blocks/juce_LEDGrid.h b/modules/juce_blocks_basics/blocks/juce_LEDGrid.h index f6c84f4277..7f9e219710 100644 --- a/modules/juce_blocks_basics/blocks/juce_LEDGrid.h +++ b/modules/juce_blocks_basics/blocks/juce_LEDGrid.h @@ -30,9 +30,9 @@ namespace juce */ struct LEDColour { - LEDColour() noexcept = default; - LEDColour (const LEDColour&) noexcept = default; - LEDColour& operator= (const LEDColour&) noexcept = default; + LEDColour() = default; + LEDColour (const LEDColour&) = default; + LEDColour& operator= (const LEDColour&) = default; LEDColour (uint32 argbColour) noexcept : argb (argbColour) {} @@ -75,7 +75,7 @@ public: /** An interface to use for LEDGrid rendering. */ struct Renderer : public juce::ReferenceCountedObject { - virtual ~Renderer(); + ~Renderer() override; virtual void renderLEDGrid (LEDGrid&) = 0; /** The Renderer class is reference-counted, so always use a Renderer::Ptr when diff --git a/modules/juce_blocks_basics/blocks/juce_TouchList.h b/modules/juce_blocks_basics/blocks/juce_TouchList.h index add44ccb28..858b97a375 100644 --- a/modules/juce_blocks_basics/blocks/juce_TouchList.h +++ b/modules/juce_blocks_basics/blocks/juce_TouchList.h @@ -38,10 +38,10 @@ class TouchList { public: /** Creates an empty touch list. */ - TouchList() {} + TouchList() = default; /** Destructor. */ - ~TouchList() {} + ~TouchList() = default; /** Returns the number of entries in the touch list. */ int size() const noexcept { return touches.size(); } diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h index 8bdcef6263..75fbbfae07 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h @@ -101,7 +101,7 @@ private: struct Variable; struct BlockStatement; struct Function; - struct AllocatedObject { virtual ~AllocatedObject() noexcept {} }; + struct AllocatedObject { virtual ~AllocatedObject() = default; }; using StatementPtr = Statement*; using ExpPtr = Expression*; using BlockPtr = BlockStatement*; @@ -143,7 +143,7 @@ private: struct CodeLocation { CodeLocation (const String& code, const File& srcFile) noexcept : program (code), location (program.getCharPointer()), sourceFile (srcFile) {} - CodeLocation (const CodeLocation& other) noexcept : program (other.program), location (other.location), sourceFile (other.sourceFile) {} + CodeLocation (const CodeLocation& other) = default; [[noreturn]] void throwError (const String& message) const { @@ -1300,7 +1300,7 @@ private: { struct Visitor { - virtual ~Visitor() {} + virtual ~Visitor() = default; virtual void operator()(StatementPtr) = 0; }; diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h index 788474f35a..8a6bf64ea7 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h @@ -593,9 +593,9 @@ struct Runner */ struct FunctionExecutionContext { - FunctionExecutionContext() noexcept : programCounter (nullptr) {} - FunctionExecutionContext (const FunctionExecutionContext&) noexcept = default; - FunctionExecutionContext& operator= (const FunctionExecutionContext&) noexcept = default; + FunctionExecutionContext() = default; + FunctionExecutionContext (const FunctionExecutionContext&) = default; + FunctionExecutionContext& operator= (const FunctionExecutionContext&) = default; /** */ FunctionExecutionContext (Runner& r, const char* functionSignature) noexcept @@ -686,7 +686,7 @@ struct Runner private: //============================================================================== Runner* runner; - const uint8* programCounter; + const uint8* programCounter = nullptr; const uint8* programEnd; const uint8* programBase; uint8* heapStart; diff --git a/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h b/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h index 92048566e6..69bb6437bb 100644 --- a/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h +++ b/modules/juce_blocks_basics/protocol/juce_BitPackingUtilities.h @@ -54,9 +54,9 @@ static uint8 calculatePacketChecksum (const uint8* data, uint32 size) noexcept template struct IntegerWithBitSize { - IntegerWithBitSize() noexcept = default; - IntegerWithBitSize (const IntegerWithBitSize&) noexcept = default; - IntegerWithBitSize& operator= (const IntegerWithBitSize&) noexcept = default; + IntegerWithBitSize() = default; + IntegerWithBitSize (const IntegerWithBitSize&) = default; + IntegerWithBitSize& operator= (const IntegerWithBitSize&) = default; IntegerWithBitSize (uint32 v) noexcept : value (v) { diff --git a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h index ffc8e8e632..2ce88c2e37 100644 --- a/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.h @@ -37,7 +37,7 @@ public: PhysicalTopologySource (bool startDetached = false); /** Destructor. */ - ~PhysicalTopologySource(); + ~PhysicalTopologySource() override; /** Returns the current physical topology. */ BlockTopology getCurrentTopology() const override; diff --git a/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h b/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h index 1d47bf3e07..fb7e02d2cf 100644 --- a/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_RuleBasedTopologySource.h @@ -41,7 +41,7 @@ public: RuleBasedTopologySource (TopologySource&); /** Destructor. */ - ~RuleBasedTopologySource(); + ~RuleBasedTopologySource() override; //========================================================================== /** Returns the currently active topology. */ @@ -50,7 +50,7 @@ public: /** A rule that can transform parts of a topology. */ struct Rule { - virtual ~Rule() {} + virtual ~Rule() = default; /** Subclasses should implement this method and use it as their opportunity to examine the given topology and modify it. For example they may want to substitute diff --git a/modules/juce_blocks_basics/topology/juce_TopologySource.h b/modules/juce_blocks_basics/topology/juce_TopologySource.h index 065bc9b0c8..224e1e7a9d 100644 --- a/modules/juce_blocks_basics/topology/juce_TopologySource.h +++ b/modules/juce_blocks_basics/topology/juce_TopologySource.h @@ -32,7 +32,7 @@ class TopologySource public: //========================================================================== /** Destructor. */ - virtual ~TopologySource() {} + virtual ~TopologySource() = default; /** Returns the current topology that this object manages. */ virtual BlockTopology getCurrentTopology() const = 0; @@ -47,7 +47,7 @@ public: /** Used to receive callbacks for topology changes */ struct Listener { - virtual ~Listener() {} + virtual ~Listener() = default; virtual void topologyChanged() = 0; }; diff --git a/modules/juce_core/containers/juce_ArrayAllocationBase.h b/modules/juce_core/containers/juce_ArrayAllocationBase.h index ab75a76528..b967c41c8c 100644 --- a/modules/juce_core/containers/juce_ArrayAllocationBase.h +++ b/modules/juce_core/containers/juce_ArrayAllocationBase.h @@ -39,14 +39,10 @@ class ArrayAllocationBase : public TypeOfCriticalSectionToUse public: //============================================================================== /** Creates an empty array. */ - ArrayAllocationBase() noexcept - { - } + ArrayAllocationBase() = default; /** Destructor. */ - ~ArrayAllocationBase() noexcept - { - } + ~ArrayAllocationBase() = default; ArrayAllocationBase (ArrayAllocationBase&& other) noexcept : elements (std::move (other.elements)), diff --git a/modules/juce_core/containers/juce_DynamicObject.h b/modules/juce_core/containers/juce_DynamicObject.h index a4b8c4d682..9085e090ae 100644 --- a/modules/juce_core/containers/juce_DynamicObject.h +++ b/modules/juce_core/containers/juce_DynamicObject.h @@ -42,7 +42,7 @@ public: //============================================================================== DynamicObject(); DynamicObject (const DynamicObject&); - ~DynamicObject(); + ~DynamicObject() override; using Ptr = ReferenceCountedObjectPtr; diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index d6bc612cb4..5dc305087c 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -120,7 +120,7 @@ public: */ explicit HashMap (int numberOfSlots = defaultHashTableSize, HashFunctionType hashFunction = HashFunctionType()) - : hashFunctionToUse (hashFunction), totalNumItems (0) + : hashFunctionToUse (hashFunction) { hashSlots.insertMultiple (0, nullptr, numberOfSlots); } @@ -479,7 +479,7 @@ private: HashFunctionType hashFunctionToUse; Array hashSlots; - int totalNumItems; + int totalNumItems = 0; TypeOfCriticalSectionToUse lock; int generateHashFor (KeyTypeParameter key, int numSlots) const diff --git a/modules/juce_core/containers/juce_ListenerList.h b/modules/juce_core/containers/juce_ListenerList.h index 026190388c..93d73efa36 100644 --- a/modules/juce_core/containers/juce_ListenerList.h +++ b/modules/juce_core/containers/juce_ListenerList.h @@ -70,10 +70,10 @@ class ListenerList public: //============================================================================== /** Creates an empty list. */ - ListenerList() {} + ListenerList() = default; /** Destructor. */ - ~ListenerList() {} + ~ListenerList() = default; //============================================================================== /** Adds a listener to the list. @@ -194,7 +194,7 @@ public: : list (listToIterate), index (listToIterate.size()) {} - ~Iterator() noexcept {} + ~Iterator() = default; //============================================================================== bool next() noexcept diff --git a/modules/juce_core/containers/juce_SortedSet.h b/modules/juce_core/containers/juce_SortedSet.h index 2a594974fb..ef7e3a976c 100644 --- a/modules/juce_core/containers/juce_SortedSet.h +++ b/modules/juce_core/containers/juce_SortedSet.h @@ -59,7 +59,7 @@ public: //============================================================================== /** Creates an empty set. */ // VS2013 doesn't allow defaulted noexcept constructors. - SortedSet() noexcept {} + SortedSet() = default; /** Creates a copy of another set. */ SortedSet (const SortedSet&) = default; @@ -76,7 +76,7 @@ public: SortedSet& operator= (SortedSet&& other) noexcept { data = std::move (other.data); return *this; } /** Destructor. */ - ~SortedSet() noexcept {} + ~SortedSet() = default; //============================================================================== /** Compares this set to another one. diff --git a/modules/juce_core/containers/juce_SparseSet.h b/modules/juce_core/containers/juce_SparseSet.h index aeb96ffa5c..68cb51e5f0 100644 --- a/modules/juce_core/containers/juce_SparseSet.h +++ b/modules/juce_core/containers/juce_SparseSet.h @@ -41,7 +41,7 @@ class SparseSet { public: //============================================================================== - SparseSet() noexcept {} + SparseSet() = default; SparseSet (const SparseSet&) = default; SparseSet& operator= (const SparseSet&) = default; diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index 8a77de12ef..e52b138a75 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -48,7 +48,7 @@ public: You can use its operator= method to point it at a proper file. */ - File() noexcept {} + File() = default; /** Creates a file from an absolute path. @@ -66,7 +66,7 @@ public: File (const File&); /** Destructor. */ - ~File() noexcept {} + ~File() = default; /** Sets the file based on an absolute pathname. diff --git a/modules/juce_core/maths/juce_Expression.h b/modules/juce_core/maths/juce_Expression.h index c64143d691..c825b691dc 100644 --- a/modules/juce_core/maths/juce_Expression.h +++ b/modules/juce_core/maths/juce_Expression.h @@ -136,7 +136,7 @@ public: class Visitor { public: - virtual ~Visitor() {} + virtual ~Visitor() = default; virtual void visit (const Scope&) = 0; }; diff --git a/modules/juce_core/maths/juce_NormalisableRange.h b/modules/juce_core/maths/juce_NormalisableRange.h index a0855a4c10..edda39a146 100644 --- a/modules/juce_core/maths/juce_NormalisableRange.h +++ b/modules/juce_core/maths/juce_NormalisableRange.h @@ -40,7 +40,7 @@ class NormalisableRange { public: /** Creates a continuous range that performs a dummy mapping. */ - NormalisableRange() noexcept {} + NormalisableRange() = default; NormalisableRange (const NormalisableRange&) = default; NormalisableRange& operator= (const NormalisableRange&) = default; diff --git a/modules/juce_core/memory/juce_HeapBlock.h b/modules/juce_core/memory/juce_HeapBlock.h index ce1f98bbfb..e86f92a2e7 100644 --- a/modules/juce_core/memory/juce_HeapBlock.h +++ b/modules/juce_core/memory/juce_HeapBlock.h @@ -97,9 +97,7 @@ public: After creation, you can resize the array using the malloc(), calloc(), or realloc() methods. */ - HeapBlock() noexcept - { - } + HeapBlock() = default; /** Creates a HeapBlock containing a number of elements. diff --git a/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h b/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h index aacf2c5156..5a336dce55 100644 --- a/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_HeavyweightLeakedObjectDetector.h @@ -56,7 +56,7 @@ private: //============================================================================== struct BacktraceMapHolder { - BacktraceMapHolder() noexcept {} + BacktraceMapHolder() = default; ~BacktraceMapHolder() { diff --git a/modules/juce_core/memory/juce_LeakedObjectDetector.h b/modules/juce_core/memory/juce_LeakedObjectDetector.h index 1196a751ad..5aa7e54619 100644 --- a/modules/juce_core/memory/juce_LeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_LeakedObjectDetector.h @@ -72,7 +72,7 @@ private: class LeakCounter { public: - LeakCounter() noexcept {} + LeakCounter() = default; ~LeakCounter() { diff --git a/modules/juce_core/memory/juce_OptionalScopedPointer.h b/modules/juce_core/memory/juce_OptionalScopedPointer.h index dd6e7e3245..fa7362c263 100644 --- a/modules/juce_core/memory/juce_OptionalScopedPointer.h +++ b/modules/juce_core/memory/juce_OptionalScopedPointer.h @@ -41,7 +41,7 @@ class OptionalScopedPointer public: //============================================================================== /** Creates an empty OptionalScopedPointer. */ - OptionalScopedPointer() : shouldDelete (false) {} + OptionalScopedPointer() = default; /** Creates an OptionalScopedPointer to point to a given object, and specifying whether the OptionalScopedPointer will delete it. @@ -177,7 +177,7 @@ public: private: //============================================================================== ScopedPointer object; - bool shouldDelete; + bool shouldDelete = false; // This is here to avoid people accidentally taking a second owned copy of // a scoped pointer, which is almost certainly not what you intended to do! diff --git a/modules/juce_core/memory/juce_ReferenceCountedObject.h b/modules/juce_core/memory/juce_ReferenceCountedObject.h index 58ef79ba98..617d2d091d 100644 --- a/modules/juce_core/memory/juce_ReferenceCountedObject.h +++ b/modules/juce_core/memory/juce_ReferenceCountedObject.h @@ -99,7 +99,7 @@ public: protected: //============================================================================== /** Creates the reference-counted object (with an initial ref count of zero). */ - ReferenceCountedObject() {} + ReferenceCountedObject() = default; /** Copying from another object does not affect this one's reference-count. */ ReferenceCountedObject (const ReferenceCountedObject&) noexcept {} @@ -187,7 +187,7 @@ public: protected: //============================================================================== /** Creates the reference-counted object (with an initial ref count of zero). */ - SingleThreadedReferenceCountedObject() {} + SingleThreadedReferenceCountedObject() = default; /** Copying from another object does not affect this one's reference-count. */ SingleThreadedReferenceCountedObject (const SingleThreadedReferenceCountedObject&) {} @@ -246,7 +246,7 @@ public: //============================================================================== /** Creates a pointer to a null object. */ - ReferenceCountedObjectPtr() noexcept {} + ReferenceCountedObjectPtr() = default; /** Creates a pointer to a null object. */ ReferenceCountedObjectPtr (decltype (nullptr)) noexcept {} diff --git a/modules/juce_core/memory/juce_ScopedPointer.h b/modules/juce_core/memory/juce_ScopedPointer.h index 5c64c0fd47..977d2e0473 100644 --- a/modules/juce_core/memory/juce_ScopedPointer.h +++ b/modules/juce_core/memory/juce_ScopedPointer.h @@ -60,7 +60,7 @@ class ScopedPointer public: //============================================================================== /** Creates a ScopedPointer containing a null pointer. */ - inline ScopedPointer() noexcept {} + inline ScopedPointer() = default; /** Creates a ScopedPointer containing a null pointer. */ inline ScopedPointer (decltype (nullptr)) noexcept {} diff --git a/modules/juce_core/memory/juce_Singleton.h b/modules/juce_core/memory/juce_Singleton.h index 2ed9ea5db1..4bea3e92c6 100644 --- a/modules/juce_core/memory/juce_Singleton.h +++ b/modules/juce_core/memory/juce_Singleton.h @@ -37,7 +37,7 @@ namespace juce template struct SingletonHolder : private MutexType // (inherited so we can use the empty-base-class optimisation) { - SingletonHolder() noexcept {} + SingletonHolder() = default; ~SingletonHolder() { diff --git a/modules/juce_core/memory/juce_WeakReference.h b/modules/juce_core/memory/juce_WeakReference.h index 9c0fd23eb7..2f6199edbc 100644 --- a/modules/juce_core/memory/juce_WeakReference.h +++ b/modules/juce_core/memory/juce_WeakReference.h @@ -78,7 +78,7 @@ class WeakReference { public: /** Creates a null WeakReference. */ - inline WeakReference() noexcept {} + inline WeakReference() = default; /** Creates a WeakReference that points at the given object. */ WeakReference (ObjectType* object) : holder (getRef (object)) {} @@ -152,7 +152,7 @@ public: class Master { public: - Master() noexcept {} + Master() = default; ~Master() noexcept { diff --git a/modules/juce_core/network/juce_WebInputStream.h b/modules/juce_core/network/juce_WebInputStream.h index ba2d9d0bce..18602e7b4e 100644 --- a/modules/juce_core/network/juce_WebInputStream.h +++ b/modules/juce_core/network/juce_WebInputStream.h @@ -36,7 +36,7 @@ class JUCE_API WebInputStream : public InputStream class JUCE_API Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; virtual bool postDataSendProgress (WebInputStream& /*request*/, int /*bytesSent*/, int /*totalBytes*/) { return true; } }; diff --git a/modules/juce_core/streams/juce_InputSource.h b/modules/juce_core/streams/juce_InputSource.h index 57f974f19f..847de1e555 100644 --- a/modules/juce_core/streams/juce_InputSource.h +++ b/modules/juce_core/streams/juce_InputSource.h @@ -38,10 +38,10 @@ class JUCE_API InputSource { public: //============================================================================== - InputSource() noexcept {} + InputSource() = default; /** Destructor. */ - virtual ~InputSource() {} + virtual ~InputSource() = default; //============================================================================== /** Returns a new InputStream to read this item. diff --git a/modules/juce_core/streams/juce_InputStream.h b/modules/juce_core/streams/juce_InputStream.h index d2c8b200d4..38d5863d1d 100644 --- a/modules/juce_core/streams/juce_InputStream.h +++ b/modules/juce_core/streams/juce_InputStream.h @@ -37,7 +37,7 @@ class JUCE_API InputStream { public: /** Destructor. */ - virtual ~InputStream() {} + virtual ~InputStream() = default; //============================================================================== /** Returns the total number of bytes available for reading in this stream. @@ -253,7 +253,7 @@ public: protected: //============================================================================== - InputStream() noexcept {} + InputStream() = default; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InputStream) diff --git a/modules/juce_core/text/juce_CharPointer_ASCII.h b/modules/juce_core/text/juce_CharPointer_ASCII.h index a89ee81f0e..ca5c1050e7 100644 --- a/modules/juce_core/text/juce_CharPointer_ASCII.h +++ b/modules/juce_core/text/juce_CharPointer_ASCII.h @@ -44,10 +44,7 @@ public: { } - inline CharPointer_ASCII (const CharPointer_ASCII& other) noexcept - : data (other.data) - { - } + inline CharPointer_ASCII (const CharPointer_ASCII& other) = default; inline CharPointer_ASCII operator= (const CharPointer_ASCII other) noexcept { diff --git a/modules/juce_core/text/juce_CharPointer_UTF16.h b/modules/juce_core/text/juce_CharPointer_UTF16.h index ccffb42950..54b0866218 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF16.h +++ b/modules/juce_core/text/juce_CharPointer_UTF16.h @@ -45,10 +45,7 @@ public: { } - inline CharPointer_UTF16 (const CharPointer_UTF16& other) noexcept - : data (other.data) - { - } + inline CharPointer_UTF16 (const CharPointer_UTF16& other) = default; inline CharPointer_UTF16 operator= (CharPointer_UTF16 other) noexcept { diff --git a/modules/juce_core/text/juce_CharPointer_UTF32.h b/modules/juce_core/text/juce_CharPointer_UTF32.h index c8c4a19d91..836c7af05e 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF32.h +++ b/modules/juce_core/text/juce_CharPointer_UTF32.h @@ -41,10 +41,7 @@ public: { } - inline CharPointer_UTF32 (const CharPointer_UTF32& other) noexcept - : data (other.data) - { - } + inline CharPointer_UTF32 (const CharPointer_UTF32& other) = default; inline CharPointer_UTF32 operator= (CharPointer_UTF32 other) noexcept { diff --git a/modules/juce_core/text/juce_CharPointer_UTF8.h b/modules/juce_core/text/juce_CharPointer_UTF8.h index 9496dc3a74..09b86325ca 100644 --- a/modules/juce_core/text/juce_CharPointer_UTF8.h +++ b/modules/juce_core/text/juce_CharPointer_UTF8.h @@ -41,10 +41,7 @@ public: { } - inline CharPointer_UTF8 (const CharPointer_UTF8& other) noexcept - : data (other.data) - { - } + inline CharPointer_UTF8 (const CharPointer_UTF8& other) = default; inline CharPointer_UTF8 operator= (CharPointer_UTF8 other) noexcept { diff --git a/modules/juce_core/threads/juce_CriticalSection.h b/modules/juce_core/threads/juce_CriticalSection.h index e1d2463b92..d8ae0f585e 100644 --- a/modules/juce_core/threads/juce_CriticalSection.h +++ b/modules/juce_core/threads/juce_CriticalSection.h @@ -133,8 +133,8 @@ private: class JUCE_API DummyCriticalSection { public: - inline DummyCriticalSection() noexcept {} - inline ~DummyCriticalSection() noexcept {} + inline DummyCriticalSection() = default; + inline ~DummyCriticalSection() = default; inline void enter() const noexcept {} inline bool tryEnter() const noexcept { return true; } diff --git a/modules/juce_core/threads/juce_DynamicLibrary.h b/modules/juce_core/threads/juce_DynamicLibrary.h index 0ad5198d2e..e5a4d5ede2 100644 --- a/modules/juce_core/threads/juce_DynamicLibrary.h +++ b/modules/juce_core/threads/juce_DynamicLibrary.h @@ -38,7 +38,7 @@ public: /** Creates an unopened DynamicLibrary object. Call open() to actually open one. */ - DynamicLibrary() noexcept {} + DynamicLibrary() = default; /** */ diff --git a/modules/juce_core/threads/juce_SpinLock.h b/modules/juce_core/threads/juce_SpinLock.h index 78fd713b5a..f3328f00ec 100644 --- a/modules/juce_core/threads/juce_SpinLock.h +++ b/modules/juce_core/threads/juce_SpinLock.h @@ -41,8 +41,8 @@ namespace juce class JUCE_API SpinLock { public: - inline SpinLock() noexcept {} - inline ~SpinLock() noexcept {} + inline SpinLock() = default; + inline ~SpinLock() = default; /** Acquires the lock. This will block until the lock has been successfully acquired by this thread. diff --git a/modules/juce_core/threads/juce_Thread.h b/modules/juce_core/threads/juce_Thread.h index cf9d268c7e..bd9a704932 100644 --- a/modules/juce_core/threads/juce_Thread.h +++ b/modules/juce_core/threads/juce_Thread.h @@ -180,7 +180,7 @@ public: class JUCE_API Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; /** Called if Thread::signalThreadShouldExit was called. @see Thread::threadShouldExit, Thread::addListener, Thread::removeListener diff --git a/modules/juce_core/threads/juce_ThreadLocalValue.h b/modules/juce_core/threads/juce_ThreadLocalValue.h index 18efd11fbd..17d1e02517 100644 --- a/modules/juce_core/threads/juce_ThreadLocalValue.h +++ b/modules/juce_core/threads/juce_ThreadLocalValue.h @@ -48,9 +48,7 @@ class ThreadLocalValue { public: /** */ - ThreadLocalValue() noexcept - { - } + ThreadLocalValue() = default; /** Destructor. When this object is deleted, all the value objects for all threads will be deleted. diff --git a/modules/juce_core/threads/juce_ThreadPool.h b/modules/juce_core/threads/juce_ThreadPool.h index a815293074..d39ca67aee 100644 --- a/modules/juce_core/threads/juce_ThreadPool.h +++ b/modules/juce_core/threads/juce_ThreadPool.h @@ -191,7 +191,7 @@ public: class JUCE_API JobSelector { public: - virtual ~JobSelector() {} + virtual ~JobSelector() = default; /** Should return true if the specified thread matches your criteria for whatever operation that this object is being used for. diff --git a/modules/juce_core/threads/juce_TimeSliceThread.h b/modules/juce_core/threads/juce_TimeSliceThread.h index d47994c837..61b0ea2f40 100644 --- a/modules/juce_core/threads/juce_TimeSliceThread.h +++ b/modules/juce_core/threads/juce_TimeSliceThread.h @@ -44,7 +44,7 @@ class JUCE_API TimeSliceClient { public: /** Destructor. */ - virtual ~TimeSliceClient() {} + virtual ~TimeSliceClient() = default; /** Called back by a TimeSliceThread. diff --git a/modules/juce_core/zip/juce_ZipFile.h b/modules/juce_core/zip/juce_ZipFile.h index 88fab01cba..45173daa37 100644 --- a/modules/juce_core/zip/juce_ZipFile.h +++ b/modules/juce_core/zip/juce_ZipFile.h @@ -243,7 +243,7 @@ private: #if JUCE_DEBUG struct OpenStreamCounter { - OpenStreamCounter() {} + OpenStreamCounter() = default; ~OpenStreamCounter(); int numOpenStreams = 0; diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.h b/modules/juce_data_structures/undomanager/juce_UndoManager.h index efa055eca6..96319950e4 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.h +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.h @@ -70,7 +70,7 @@ public: int minimumTransactionsToKeep = 30); /** Destructor. */ - ~UndoManager(); + ~UndoManager() override; //============================================================================== /** Deletes all stored actions in the list. */ diff --git a/modules/juce_data_structures/undomanager/juce_UndoableAction.h b/modules/juce_data_structures/undomanager/juce_UndoableAction.h index 058dc07396..62d1e6b90f 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoableAction.h +++ b/modules/juce_data_structures/undomanager/juce_UndoableAction.h @@ -40,11 +40,11 @@ class JUCE_API UndoableAction { protected: /** Creates an action. */ - UndoableAction() noexcept {} + UndoableAction() = default; public: /** Destructor. */ - virtual ~UndoableAction() {} + virtual ~UndoableAction() = default; //============================================================================== /** Overridden by a subclass to perform the action. diff --git a/modules/juce_data_structures/values/juce_CachedValue.h b/modules/juce_data_structures/values/juce_CachedValue.h index 3fd83bb9e6..3d6a2afae6 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.h +++ b/modules/juce_data_structures/values/juce_CachedValue.h @@ -210,7 +210,7 @@ private: //============================================================================== template -inline CachedValue::CachedValue() {} +inline CachedValue::CachedValue() = default; template inline CachedValue::CachedValue (ValueTree& v, const Identifier& i, UndoManager* um) diff --git a/modules/juce_data_structures/values/juce_Value.h b/modules/juce_data_structures/values/juce_Value.h index c798b6312e..4259020814 100644 --- a/modules/juce_data_structures/values/juce_Value.h +++ b/modules/juce_data_structures/values/juce_Value.h @@ -138,8 +138,8 @@ public: class JUCE_API Listener { public: - Listener() {} - virtual ~Listener() {} + Listener() = default; + virtual ~Listener() = default; /** Called when a Value object is changed. diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index 601bda2635..d9c0443d42 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -475,7 +475,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** This method is called when a property of this tree (or of one of its sub-trees) is changed. Note that when you register a listener to a tree, it will receive this callback for diff --git a/modules/juce_data_structures/values/juce_ValueWithDefault.h b/modules/juce_data_structures/values/juce_ValueWithDefault.h index a74ab4681c..d209a95013 100644 --- a/modules/juce_data_structures/values/juce_ValueWithDefault.h +++ b/modules/juce_data_structures/values/juce_ValueWithDefault.h @@ -41,7 +41,7 @@ class ValueWithDefault public: //============================================================================== /** Creates an unitialised ValueWithDefault. Initialise it using one of the referTo() methods. */ - ValueWithDefault() {} + ValueWithDefault() = default; /** Creates an ValueWithDefault object. The default value will be an empty var. */ ValueWithDefault (ValueTree& tree, const Identifier& propertyID, UndoManager* um) diff --git a/modules/juce_dsp/containers/juce_AudioBlock.h b/modules/juce_dsp/containers/juce_AudioBlock.h index 451597effa..95f6de74f2 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock.h +++ b/modules/juce_dsp/containers/juce_AudioBlock.h @@ -62,7 +62,7 @@ public: //============================================================================== /** Create a zero-sized AudioBlock. */ - forcedinline AudioBlock() noexcept {} + forcedinline AudioBlock() noexcept = default; /** Creates an AudioBlock from a pointer to an array of channels. AudioBlock does not copy nor own the memory pointed to by dataToUse. diff --git a/modules/juce_dsp/containers/juce_SIMDRegister.h b/modules/juce_dsp/containers/juce_SIMDRegister.h index be268b5220..b7c9f2ea25 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister.h +++ b/modules/juce_dsp/containers/juce_SIMDRegister.h @@ -109,7 +109,7 @@ struct SIMDRegister vSIMDType value; /** Default constructor. */ - inline SIMDRegister() noexcept {} + inline SIMDRegister() noexcept = default; /** Constructs an object from the native SIMD type. */ inline SIMDRegister (vSIMDType a) noexcept : value (a) {} @@ -118,7 +118,7 @@ struct SIMDRegister inline SIMDRegister (Type s) noexcept { *this = s; } /** Destrutor. */ - inline ~SIMDRegister() noexcept {} + inline ~SIMDRegister() noexcept = default; //============================================================================== /** Returns the number of elements in this vector. */ diff --git a/modules/juce_dsp/maths/juce_LookupTable.h b/modules/juce_dsp/maths/juce_LookupTable.h index 620e5acd45..949c7f4ec0 100644 --- a/modules/juce_dsp/maths/juce_LookupTable.h +++ b/modules/juce_dsp/maths/juce_LookupTable.h @@ -183,8 +183,7 @@ public: @see initialise */ - LookupTableTransform() - {} + LookupTableTransform() = default; //============================================================================== /** Creates and initialises a LookupTableTransform object. diff --git a/modules/juce_dsp/processors/juce_Bias.h b/modules/juce_dsp/processors/juce_Bias.h index aeb765db27..85477ecb5b 100644 --- a/modules/juce_dsp/processors/juce_Bias.h +++ b/modules/juce_dsp/processors/juce_Bias.h @@ -44,7 +44,7 @@ template class Bias { public: - Bias() noexcept {} + Bias() noexcept = default; //============================================================================== /** Sets the DC bias diff --git a/modules/juce_dsp/processors/juce_Gain.h b/modules/juce_dsp/processors/juce_Gain.h index 5f8e46720e..db78578e7c 100644 --- a/modules/juce_dsp/processors/juce_Gain.h +++ b/modules/juce_dsp/processors/juce_Gain.h @@ -38,7 +38,7 @@ template class Gain { public: - Gain() noexcept {} + Gain() noexcept = default; //============================================================================== /** Applies a new gain as a linear value. */ diff --git a/modules/juce_dsp/processors/juce_Oscillator.h b/modules/juce_dsp/processors/juce_Oscillator.h index 404c76304f..bb593dedf0 100644 --- a/modules/juce_dsp/processors/juce_Oscillator.h +++ b/modules/juce_dsp/processors/juce_Oscillator.h @@ -44,8 +44,7 @@ public: using NumericType = typename SampleTypeHelpers::ElementType::Type; /** Creates an uninitialised oscillator. Call initialise before first use. */ - Oscillator() - {} + Oscillator() = default; /** Creates an oscillator with a periodic input function (-pi..pi). diff --git a/modules/juce_dsp/processors/juce_Reverb.h b/modules/juce_dsp/processors/juce_Reverb.h index 35a1fb496f..a2ff395343 100644 --- a/modules/juce_dsp/processors/juce_Reverb.h +++ b/modules/juce_dsp/processors/juce_Reverb.h @@ -39,8 +39,7 @@ class Reverb public: //============================================================================== /** Creates an uninitialised Reverb processor. Call prepare() before first use. */ - Reverb() - {} + Reverb() = default; //============================================================================== using Parameters = juce::Reverb::Parameters; diff --git a/modules/juce_events/broadcasters/juce_ActionListener.h b/modules/juce_events/broadcasters/juce_ActionListener.h index 910b82ab77..65fcb3950f 100644 --- a/modules/juce_events/broadcasters/juce_ActionListener.h +++ b/modules/juce_events/broadcasters/juce_ActionListener.h @@ -35,7 +35,7 @@ class JUCE_API ActionListener { public: /** Destructor. */ - virtual ~ActionListener() {} + virtual ~ActionListener() = default; /** Overridden by your subclass to receive the callback. diff --git a/modules/juce_events/broadcasters/juce_ChangeListener.h b/modules/juce_events/broadcasters/juce_ChangeListener.h index 438acc7d64..b34dbe4592 100644 --- a/modules/juce_events/broadcasters/juce_ChangeListener.h +++ b/modules/juce_events/broadcasters/juce_ChangeListener.h @@ -45,7 +45,7 @@ class JUCE_API ChangeListener { public: /** Destructor. */ - virtual ~ChangeListener() {} + virtual ~ChangeListener() = default; /** Your subclass should implement this method to receive the callback. @param source the ChangeBroadcaster that triggered the callback. diff --git a/modules/juce_events/messages/juce_CallbackMessage.h b/modules/juce_events/messages/juce_CallbackMessage.h index 09edb8817b..f1e2bab6d9 100644 --- a/modules/juce_events/messages/juce_CallbackMessage.h +++ b/modules/juce_events/messages/juce_CallbackMessage.h @@ -49,10 +49,10 @@ class JUCE_API CallbackMessage : public MessageManager::MessageBase { public: //============================================================================== - CallbackMessage() noexcept {} + CallbackMessage() = default; /** Destructor. */ - ~CallbackMessage() {} + ~CallbackMessage() override = default; //============================================================================== /** Called when the message is delivered. @@ -63,7 +63,7 @@ public: Note that like all other messages, this object will be deleted immediately after this method has been invoked. */ - virtual void messageCallback() = 0; + virtual void messageCallback() override = 0; private: // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered diff --git a/modules/juce_events/messages/juce_MessageManager.h b/modules/juce_events/messages/juce_MessageManager.h index 901d006a16..4e57055b89 100644 --- a/modules/juce_events/messages/juce_MessageManager.h +++ b/modules/juce_events/messages/juce_MessageManager.h @@ -186,8 +186,8 @@ public: class JUCE_API MessageBase : public ReferenceCountedObject { public: - MessageBase() noexcept {} - virtual ~MessageBase() {} + MessageBase() = default; + ~MessageBase() override = default; virtual void messageCallback() = 0; bool post(); diff --git a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h index b5a73db142..403b3031b1 100644 --- a/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h +++ b/modules/juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h @@ -49,7 +49,7 @@ public: const RectangleList& initialClip); /** Destructor. */ - ~LowLevelGraphicsSoftwareRenderer(); + ~LowLevelGraphicsSoftwareRenderer() override; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LowLevelGraphicsSoftwareRenderer) diff --git a/modules/juce_graphics/effects/juce_ImageEffectFilter.h b/modules/juce_graphics/effects/juce_ImageEffectFilter.h index a8e1891a24..fa103d26c4 100644 --- a/modules/juce_graphics/effects/juce_ImageEffectFilter.h +++ b/modules/juce_graphics/effects/juce_ImageEffectFilter.h @@ -65,7 +65,7 @@ public: float alpha) = 0; /** Destructor. */ - virtual ~ImageEffectFilter() {} + virtual ~ImageEffectFilter() = default; }; diff --git a/modules/juce_graphics/fonts/juce_AttributedString.h b/modules/juce_graphics/fonts/juce_AttributedString.h index b283b605d4..5dd30979c1 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.h +++ b/modules/juce_graphics/fonts/juce_AttributedString.h @@ -48,7 +48,7 @@ public: /** Creates an attributed string with the given text. */ explicit AttributedString (const String& newString) { setText (newString); } - AttributedString (const AttributedString&) = default; + AttributedString (const AttributedString&) = default; AttributedString& operator= (const AttributedString&) = default; // VS2013 can't default move constructors and assignments @@ -152,7 +152,7 @@ public: public: Attribute() = default; - Attribute (const Attribute&) = default; + Attribute (const Attribute&) = default; Attribute& operator= (const Attribute&) = default; // VS2013 can't default move constructors and assignments diff --git a/modules/juce_graphics/fonts/juce_Typeface.h b/modules/juce_graphics/fonts/juce_Typeface.h index 0c6c17ac53..e433a6046d 100644 --- a/modules/juce_graphics/fonts/juce_Typeface.h +++ b/modules/juce_graphics/fonts/juce_Typeface.h @@ -75,7 +75,7 @@ public: //============================================================================== /** Destructor. */ - virtual ~Typeface(); + ~Typeface() override; /** Returns true if this typeface can be used to render the specified font. When called, the font will already have been checked to make sure that its name and diff --git a/modules/juce_graphics/geometry/juce_RectangleList.h b/modules/juce_graphics/geometry/juce_RectangleList.h index 108df0b8f6..f6e0b993d5 100644 --- a/modules/juce_graphics/geometry/juce_RectangleList.h +++ b/modules/juce_graphics/geometry/juce_RectangleList.h @@ -47,7 +47,7 @@ public: //============================================================================== /** Creates an empty RectangleList */ - RectangleList() noexcept {} + RectangleList() = default; /** Creates a copy of another list */ RectangleList (const RectangleList& other) : rects (other.rects) diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index 3e077926b7..742e3f51a4 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -360,9 +360,9 @@ public: class BitmapDataReleaser { protected: - BitmapDataReleaser() {} + BitmapDataReleaser() = default; public: - virtual ~BitmapDataReleaser() {} + virtual ~BitmapDataReleaser() = default; }; std::unique_ptr dataReleaser; @@ -444,7 +444,7 @@ class JUCE_API ImagePixelData : public ReferenceCountedObject { public: ImagePixelData (Image::PixelFormat, int width, int height); - ~ImagePixelData(); + ~ImagePixelData() override; using Ptr = ReferenceCountedObjectPtr; @@ -475,7 +475,7 @@ public: /** Used to receive callbacks for image data changes */ struct Listener { - virtual ~Listener() {} + virtual ~Listener() = default; virtual void imageDataChanged (ImagePixelData*) = 0; virtual void imageDataBeingDeleted (ImagePixelData*) = 0; diff --git a/modules/juce_graphics/images/juce_ImageFileFormat.h b/modules/juce_graphics/images/juce_ImageFileFormat.h index 84e658820c..c4be97cf2e 100644 --- a/modules/juce_graphics/images/juce_ImageFileFormat.h +++ b/modules/juce_graphics/images/juce_ImageFileFormat.h @@ -44,11 +44,11 @@ class JUCE_API ImageFileFormat protected: //============================================================================== /** Creates an ImageFormat. */ - ImageFileFormat() {} + ImageFileFormat() = default; public: /** Destructor. */ - virtual ~ImageFileFormat() {} + virtual ~ImageFileFormat() = default; //============================================================================== /** Returns a description of this file format. diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h index 39e46dbd06..b8137ac4d0 100644 --- a/modules/juce_graphics/native/juce_RenderingHelpers.h +++ b/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -43,14 +43,10 @@ namespace RenderingHelpers class TranslationOrTransform { public: - TranslationOrTransform() noexcept {} + TranslationOrTransform() = default; TranslationOrTransform (Point origin) noexcept : offset (origin) {} - TranslationOrTransform (const TranslationOrTransform& other) noexcept - : complexTransform (other.complexTransform), offset (other.offset), - isOnlyTranslated (other.isOnlyTranslated), isRotated (other.isRotated) - { - } + TranslationOrTransform (const TranslationOrTransform& other) = default; AffineTransform getTransform() const noexcept { @@ -156,7 +152,7 @@ public: reset(); } - ~GlyphCache() + ~GlyphCache() override { getSingletonPointer() = nullptr; } @@ -283,7 +279,7 @@ template class CachedGlyphEdgeTable : public ReferenceCountedObject { public: - CachedGlyphEdgeTable() {} + CachedGlyphEdgeTable() = default; void draw (RendererType& state, Point pos) const { @@ -1397,7 +1393,7 @@ namespace EdgeTableFillers private: struct BresenhamInterpolator { - BresenhamInterpolator() noexcept {} + BresenhamInterpolator() = default; void set (int n1, int n2, int steps, int offsetInt) noexcept { @@ -1628,8 +1624,8 @@ struct ClipRegions { struct Base : public SingleThreadedReferenceCountedObject { - Base() {} - virtual ~Base() {} + Base() = default; + ~Base() override = default; using Ptr = ReferenceCountedObjectPtr; @@ -2070,7 +2066,7 @@ struct ClipRegions Ptr toEdgeTable() const { return *new EdgeTableRegion (clip); } - RectangleListRegion& operator= (const RectangleListRegion&); + RectangleListRegion& operator= (const RectangleListRegion&) = delete; }; }; @@ -2528,10 +2524,7 @@ public: { } - SoftwareRendererSavedState (const SoftwareRendererSavedState& other) - : BaseClass (other), image (other.image), font (other.font) - { - } + SoftwareRendererSavedState (const SoftwareRendererSavedState& other) = default; SoftwareRendererSavedState* beginTransparencyLayer (float opacity) { @@ -2668,7 +2661,7 @@ public: Font font; private: - SoftwareRendererSavedState& operator= (const SoftwareRendererSavedState&); + SoftwareRendererSavedState& operator= (const SoftwareRendererSavedState&) = delete; }; //============================================================================== @@ -2680,7 +2673,7 @@ public: : currentState (initialState) {} - SavedStateStack() noexcept {} + SavedStateStack() = default; void initialise (StateObjectType* state) { @@ -2764,7 +2757,7 @@ public: protected: StackBasedLowLevelGraphicsContext (SavedStateType* initialState) : stack (initialState) {} - StackBasedLowLevelGraphicsContext() {} + StackBasedLowLevelGraphicsContext() = default; RenderingHelpers::SavedStateStack stack; }; diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h index 73dfd3ce5f..888a666a1a 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.h +++ b/modules/juce_gui_basics/buttons/juce_Button.h @@ -166,7 +166,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when the button is clicked. */ virtual void buttonClicked (Button*) = 0; @@ -367,7 +367,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) = 0; diff --git a/modules/juce_gui_basics/buttons/juce_ImageButton.h b/modules/juce_gui_basics/buttons/juce_ImageButton.h index 2703d7d66c..d2565851d1 100644 --- a/modules/juce_gui_basics/buttons/juce_ImageButton.h +++ b/modules/juce_gui_basics/buttons/juce_ImageButton.h @@ -131,7 +131,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawImageButton (Graphics&, Image*, int imageX, int imageY, int imageW, int imageH, diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandID.h b/modules/juce_gui_basics/commands/juce_ApplicationCommandID.h index 15af580175..85ae50604e 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandID.h +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandID.h @@ -35,7 +35,7 @@ namespace juce @see ApplicationCommandInfo, ApplicationCommandManager, ApplicationCommandTarget, KeyPressMappingSet */ -typedef int CommandID; +using CommandID = int; //============================================================================== diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h index 8639a2bd2a..3e8d27a7a0 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h @@ -338,7 +338,7 @@ class JUCE_API ApplicationCommandManagerListener public: //============================================================================== /** Destructor. */ - virtual ~ApplicationCommandManagerListener() {} + virtual ~ApplicationCommandManagerListener() = default; /** Called when an app command is about to be invoked. */ virtual void applicationCommandInvoked (const ApplicationCommandTarget::InvocationInfo&) = 0; diff --git a/modules/juce_gui_basics/components/juce_CachedComponentImage.h b/modules/juce_gui_basics/components/juce_CachedComponentImage.h index 2c1ab6ca1e..2a19691b8d 100644 --- a/modules/juce_gui_basics/components/juce_CachedComponentImage.h +++ b/modules/juce_gui_basics/components/juce_CachedComponentImage.h @@ -42,8 +42,8 @@ namespace juce class JUCE_API CachedComponentImage { public: - CachedComponentImage() noexcept {} - virtual ~CachedComponentImage() {} + CachedComponentImage() = default; + virtual ~CachedComponentImage() = default; //============================================================================== /** Called as part of the parent component's paint method, this must draw diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 8ee75862a1..2e210ddd54 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -2132,7 +2132,7 @@ public: { public: /** Creates a null SafePointer. */ - SafePointer() noexcept {} + SafePointer() = default; /** Creates a SafePointer that points at the given component. */ SafePointer (ComponentType* component) : weakRef (component) {} @@ -2205,7 +2205,7 @@ public: /** Creates a Positioner which can control the specified component. */ explicit Positioner (Component& component) noexcept; /** Destructor. */ - virtual ~Positioner() {} + virtual ~Positioner() = default; /** Returns the component that this positioner controls. */ Component& getComponent() const noexcept { return component; } diff --git a/modules/juce_gui_basics/components/juce_ComponentListener.h b/modules/juce_gui_basics/components/juce_ComponentListener.h index 8dc60a6500..b9da77f06a 100644 --- a/modules/juce_gui_basics/components/juce_ComponentListener.h +++ b/modules/juce_gui_basics/components/juce_ComponentListener.h @@ -44,7 +44,7 @@ class JUCE_API ComponentListener { public: /** Destructor. */ - virtual ~ComponentListener() {} + virtual ~ComponentListener() = default; /** Called when the component's position or size changes. diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.h b/modules/juce_gui_basics/components/juce_ModalComponentManager.h index 0845197252..961e480b73 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.h +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.h @@ -57,10 +57,10 @@ public: { public: /** */ - Callback() {} + Callback() = default; /** Destructor. */ - virtual ~Callback() {} + virtual ~Callback() = default; /** Called to indicate that a modal component has been dismissed. diff --git a/modules/juce_gui_basics/desktop/juce_Desktop.h b/modules/juce_gui_basics/desktop/juce_Desktop.h index 3cf790f0c6..41b375e1fb 100644 --- a/modules/juce_gui_basics/desktop/juce_Desktop.h +++ b/modules/juce_gui_basics/desktop/juce_Desktop.h @@ -40,7 +40,7 @@ class JUCE_API FocusChangeListener { public: /** Destructor. */ - virtual ~FocusChangeListener() {} + virtual ~FocusChangeListener() = default; /** Callback to indicate that the currently focused component has changed. */ virtual void globalFocusChanged (Component* focusedComponent) = 0; diff --git a/modules/juce_gui_basics/desktop/juce_Displays.h b/modules/juce_gui_basics/desktop/juce_Displays.h index f360124c68..1aa3f68333 100644 --- a/modules/juce_gui_basics/desktop/juce_Displays.h +++ b/modules/juce_gui_basics/desktop/juce_Displays.h @@ -127,7 +127,7 @@ public: /** @internal */ void refresh(); /** @internal */ - ~Displays() {} + ~Displays() = default; // This method has been deprecated - use the findDisplayForPoint() or findDisplayForRect() methods instead // as they can deal with converting between logical and physical pixels JUCE_DEPRECATED (const Display& getDisplayContaining (Point position) const noexcept); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h index 2b77b69a23..ce632496f9 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.h @@ -183,7 +183,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; // These return a pointer to an internally cached drawable - make sure you don't keep // a copy of this pointer anywhere, as it may become invalid in the future. diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h index b867ae131b..099f0ef365 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.h @@ -318,7 +318,7 @@ private: //============================================================================== struct Pimpl { - virtual ~Pimpl() {} + virtual ~Pimpl() = default; virtual void launch() = 0; virtual void runModally() = 0; diff --git a/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h b/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h index c2220616be..1e25368d61 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FilePreviewComponent.h @@ -49,7 +49,7 @@ public: FilePreviewComponent(); /** Destructor. */ - ~FilePreviewComponent(); + ~FilePreviewComponent() override; /** Called to indicate that the user's currently selected file has changed. diff --git a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h index 7e773a9ba5..dc93e40fad 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h @@ -42,7 +42,7 @@ class JUCE_API FilenameComponentListener { public: /** Destructor. */ - virtual ~FilenameComponentListener() {} + virtual ~FilenameComponentListener() = default; /** This method is called after the FilenameComponent's file has been changed. */ virtual void filenameComponentChanged (FilenameComponent* fileComponentThatHasChanged) = 0; @@ -191,7 +191,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual Button* createFilenameComponentBrowseButton (const String& text) = 0; virtual void layoutFilenameComponent (FilenameComponent&, ComboBox* filenameBox, Button* browseButton) = 0; diff --git a/modules/juce_gui_basics/keyboard/juce_KeyListener.h b/modules/juce_gui_basics/keyboard/juce_KeyListener.h index 291cd66ae3..c434e01b4c 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyListener.h +++ b/modules/juce_gui_basics/keyboard/juce_KeyListener.h @@ -42,7 +42,7 @@ class JUCE_API KeyListener { public: /** Destructor. */ - virtual ~KeyListener() {} + virtual ~KeyListener() = default; //============================================================================== /** Called to indicate that a key has been pressed. diff --git a/modules/juce_gui_basics/keyboard/juce_TextInputTarget.h b/modules/juce_gui_basics/keyboard/juce_TextInputTarget.h index 0e3127474a..a5043dbc90 100644 --- a/modules/juce_gui_basics/keyboard/juce_TextInputTarget.h +++ b/modules/juce_gui_basics/keyboard/juce_TextInputTarget.h @@ -43,10 +43,10 @@ class JUCE_API TextInputTarget public: //============================================================================== /** */ - TextInputTarget() {} + TextInputTarget() = default; /** Destructor. */ - virtual ~TextInputTarget() {} + virtual ~TextInputTarget() = default; /** Returns true if this input target is currently accepting input. For example, a text editor might return false if it's in read-only mode. diff --git a/modules/juce_gui_basics/layout/juce_AnimatedPosition.h b/modules/juce_gui_basics/layout/juce_AnimatedPosition.h index 18915ed8e7..e3d34fbf23 100644 --- a/modules/juce_gui_basics/layout/juce_AnimatedPosition.h +++ b/modules/juce_gui_basics/layout/juce_AnimatedPosition.h @@ -55,9 +55,8 @@ class AnimatedPosition : private Timer { public: AnimatedPosition() - : position(), grabbedPos(), releaseVelocity(), - range (-std::numeric_limits::max(), - std::numeric_limits::max()) + : range (-std::numeric_limits::max(), + std::numeric_limits::max()) { } @@ -134,7 +133,7 @@ public: class Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; /** Called synchronously when an AnimatedPosition changes. */ virtual void positionChanged (AnimatedPosition&, double newPosition) = 0; @@ -154,7 +153,7 @@ public: private: //============================================================================== - double position, grabbedPos, releaseVelocity; + double position = 0.0, grabbedPos = 0.0, releaseVelocity = 0.0; Range range; Time lastUpdate, lastDrag; ListenerList listeners; diff --git a/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h b/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h index bdf8255b8a..f75eaec743 100644 --- a/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h +++ b/modules/juce_gui_basics/layout/juce_AnimatedPositionBehaviours.h @@ -46,9 +46,7 @@ namespace AnimatedPositionBehaviours */ struct ContinuousWithMomentum { - ContinuousWithMomentum() noexcept - { - } + ContinuousWithMomentum() = default; /** Sets the friction that damps the movement of the value. A typical value is 0.08; higher values indicate more friction. @@ -114,9 +112,7 @@ namespace AnimatedPositionBehaviours */ struct SnapToPageBoundaries { - SnapToPageBoundaries() noexcept : targetSnapPosition() - { - } + SnapToPageBoundaries() = default; /** Called by the AnimatedPosition class. This tells us the position and velocity at which the user is about to release the object. @@ -154,7 +150,7 @@ namespace AnimatedPositionBehaviours } private: - double targetSnapPosition; + double targetSnapPosition = 0.0; }; } diff --git a/modules/juce_gui_basics/layout/juce_ComponentBuilder.h b/modules/juce_gui_basics/layout/juce_ComponentBuilder.h index b2be38b5f3..7a4cadaabd 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBuilder.h +++ b/modules/juce_gui_basics/layout/juce_ComponentBuilder.h @@ -186,8 +186,8 @@ public: class JUCE_API ImageProvider { public: - ImageProvider() {} - virtual ~ImageProvider() {} + ImageProvider() = default; + virtual ~ImageProvider() = default; /** Retrieves the image associated with this identifier, which could be any kind of string, number, filename, etc. diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h index 8298ce85d5..f6e0d66c54 100644 --- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h +++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.h @@ -113,7 +113,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawConcertinaPanelHeader (Graphics&, const Rectangle& area, bool isMouseOver, bool isMouseDown, diff --git a/modules/juce_gui_basics/layout/juce_GroupComponent.h b/modules/juce_gui_basics/layout/juce_GroupComponent.h index 2df67d94a0..0854e84e1e 100644 --- a/modules/juce_gui_basics/layout/juce_GroupComponent.h +++ b/modules/juce_gui_basics/layout/juce_GroupComponent.h @@ -89,7 +89,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawGroupComponentOutline (Graphics&, int w, int h, const String& text, const Justification&, GroupComponent&) = 0; diff --git a/modules/juce_gui_basics/layout/juce_ScrollBar.h b/modules/juce_gui_basics/layout/juce_ScrollBar.h index 0642f881df..fd229a47e6 100644 --- a/modules/juce_gui_basics/layout/juce_ScrollBar.h +++ b/modules/juce_gui_basics/layout/juce_ScrollBar.h @@ -305,7 +305,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when a ScrollBar is moved. @@ -328,7 +328,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual bool areScrollbarButtonsVisible() = 0; diff --git a/modules/juce_gui_basics/layout/juce_SidePanel.h b/modules/juce_gui_basics/layout/juce_SidePanel.h index 03d6c0def1..9753ab6b97 100644 --- a/modules/juce_gui_basics/layout/juce_SidePanel.h +++ b/modules/juce_gui_basics/layout/juce_SidePanel.h @@ -161,7 +161,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual Font getSidePanelTitleFont (SidePanel&) = 0; virtual Justification getSidePanelTitleJustification (SidePanel&) = 0; diff --git a/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h b/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h index bc26d42751..1e6bde360c 100644 --- a/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h +++ b/modules/juce_gui_basics/layout/juce_StretchableLayoutResizerBar.h @@ -79,7 +79,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawStretchableLayoutResizerBar (Graphics&, int w, int h, bool isVerticalBar, bool isMouseOver, bool isMouseDragging) = 0; diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h index 9b46055e42..608774f018 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h @@ -308,7 +308,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual int getTabButtonSpaceAroundImage() = 0; virtual int getTabButtonOverlap (int tabDepth) = 0; diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h index a9ddb9ee00..13be6de840 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h @@ -40,7 +40,7 @@ struct JUCE_API ExtraLookAndFeelBaseClasses /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LassoComponentMethods { - virtual ~LassoComponentMethods() {} + virtual ~LassoComponentMethods() = default; virtual void drawLasso (Graphics&, Component& lassoComp) = 0; }; @@ -49,7 +49,7 @@ struct JUCE_API ExtraLookAndFeelBaseClasses /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API KeyMappingEditorComponentMethods { - virtual ~KeyMappingEditorComponentMethods() {} + virtual ~KeyMappingEditorComponentMethods() = default; virtual void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) = 0; }; @@ -58,7 +58,7 @@ struct JUCE_API ExtraLookAndFeelBaseClasses /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API AudioDeviceSelectorComponentMethods { - virtual ~AudioDeviceSelectorComponentMethods() {} + virtual ~AudioDeviceSelectorComponentMethods() = default; virtual void drawLevelMeter (Graphics&, int width, int height, float level) = 0; }; @@ -113,7 +113,7 @@ public: LookAndFeel(); /** Destructor. */ - virtual ~LookAndFeel(); + ~LookAndFeel() override; //============================================================================== /** Returns the current default look-and-feel for a component to use when it diff --git a/modules/juce_gui_basics/menus/juce_MenuBarModel.h b/modules/juce_gui_basics/menus/juce_MenuBarModel.h index 2192ca3ff2..d496b206e6 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarModel.h +++ b/modules/juce_gui_basics/menus/juce_MenuBarModel.h @@ -80,7 +80,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; //============================================================================== /** This callback is made when items are changed in the menu bar model. */ diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 54f3bf39e7..7f07e67652 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -624,7 +624,7 @@ public: CustomComponent (bool isTriggeredAutomatically = true); /** Destructor. */ - ~CustomComponent(); + ~CustomComponent() override; /** Returns a rectangle with the size that this component would like to have. @@ -666,7 +666,7 @@ public: { public: CustomCallback(); - ~CustomCallback(); + ~CustomCallback() override; /** Callback to indicate this item has been triggered. @returns true if the itemID should be sent to the exitModalState method, or @@ -684,7 +684,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; /** Fills the background of a popup menu component. */ virtual void drawPopupMenuBackground (Graphics&, int width, int height) = 0; diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.h b/modules/juce_gui_basics/misc/juce_BubbleComponent.h index 7208ccb0e5..4aab911f2f 100644 --- a/modules/juce_gui_basics/misc/juce_BubbleComponent.h +++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.h @@ -150,7 +150,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawBubble (Graphics&, BubbleComponent&, const Point& positionOfTip, diff --git a/modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h b/modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h index 2b7712a7f4..7ba6fab489 100644 --- a/modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h +++ b/modules/juce_gui_basics/mouse/juce_DragAndDropTarget.h @@ -47,7 +47,7 @@ class JUCE_API DragAndDropTarget { public: /** Destructor. */ - virtual ~DragAndDropTarget() {} + virtual ~DragAndDropTarget() = default; //============================================================================== /** Contains details about the source of a drag-and-drop operation. */ diff --git a/modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h b/modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h index 0367e4c131..709e1f3413 100644 --- a/modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h +++ b/modules/juce_gui_basics/mouse/juce_FileDragAndDropTarget.h @@ -38,7 +38,7 @@ class JUCE_API FileDragAndDropTarget { public: /** Destructor. */ - virtual ~FileDragAndDropTarget() {} + virtual ~FileDragAndDropTarget() = default; /** Callback to check whether this target is interested in the set of files being offered. diff --git a/modules/juce_gui_basics/mouse/juce_LassoComponent.h b/modules/juce_gui_basics/mouse/juce_LassoComponent.h index 9c6349aab4..c89b97c7b2 100644 --- a/modules/juce_gui_basics/mouse/juce_LassoComponent.h +++ b/modules/juce_gui_basics/mouse/juce_LassoComponent.h @@ -43,7 +43,7 @@ class LassoSource { public: /** Destructor. */ - virtual ~LassoSource() {} + virtual ~LassoSource() = default; /** Returns the set of items that lie within a given lassoable region. @@ -103,7 +103,7 @@ class LassoComponent : public Component public: //============================================================================== /** Creates a Lasso component. */ - LassoComponent() {} + LassoComponent() = default; //============================================================================== /** Call this in your mouseDown event, to initialise a drag. diff --git a/modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h b/modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h index 0c67cfff4d..17035e5bf5 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h +++ b/modules/juce_gui_basics/mouse/juce_MouseInactivityDetector.h @@ -71,7 +71,7 @@ public: class Listener { public: - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when the mouse is moved or clicked for the first time after a period of inactivity. */ diff --git a/modules/juce_gui_basics/mouse/juce_MouseListener.h b/modules/juce_gui_basics/mouse/juce_MouseListener.h index 3639db618b..4a1129e697 100644 --- a/modules/juce_gui_basics/mouse/juce_MouseListener.h +++ b/modules/juce_gui_basics/mouse/juce_MouseListener.h @@ -40,7 +40,7 @@ class JUCE_API MouseListener { public: /** Destructor. */ - virtual ~MouseListener() {} + virtual ~MouseListener() = default; /** Called when the mouse moves inside a component. diff --git a/modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h b/modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h index d84978264e..46d2938847 100644 --- a/modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h +++ b/modules/juce_gui_basics/mouse/juce_TextDragAndDropTarget.h @@ -39,7 +39,7 @@ class JUCE_API TextDragAndDropTarget { public: /** Destructor. */ - virtual ~TextDragAndDropTarget() {} + virtual ~TextDragAndDropTarget() = default; /** Callback to check whether this target is interested in the set of text being offered. diff --git a/modules/juce_gui_basics/mouse/juce_TooltipClient.h b/modules/juce_gui_basics/mouse/juce_TooltipClient.h index ee1a14dd42..1cbc2c9cbe 100644 --- a/modules/juce_gui_basics/mouse/juce_TooltipClient.h +++ b/modules/juce_gui_basics/mouse/juce_TooltipClient.h @@ -43,7 +43,7 @@ class JUCE_API TooltipClient { public: /** Destructor. */ - virtual ~TooltipClient() {} + virtual ~TooltipClient() = default; /** Returns the string that this object wants to show as its tooltip. */ virtual String getTooltip() = 0; @@ -70,7 +70,7 @@ class JUCE_API SettableTooltipClient : public TooltipClient public: //============================================================================== /** Destructor. */ - ~SettableTooltipClient() override {} + ~SettableTooltipClient() override = default; //============================================================================== /** Assigns a new tooltip to this object. */ @@ -80,7 +80,7 @@ public: String getTooltip() override { return tooltipString; } protected: - SettableTooltipClient() {} + SettableTooltipClient() = default; private: String tooltipString; diff --git a/modules/juce_gui_basics/positioning/juce_MarkerList.h b/modules/juce_gui_basics/positioning/juce_MarkerList.h index d2c69b7788..57debbfadc 100644 --- a/modules/juce_gui_basics/positioning/juce_MarkerList.h +++ b/modules/juce_gui_basics/positioning/juce_MarkerList.h @@ -130,7 +130,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when something in the given marker list changes. */ virtual void markersChanged (MarkerList* markerList) = 0; @@ -152,7 +152,7 @@ public: /** A base class for objects that want to provide a MarkerList. */ struct MarkerListHolder { - virtual ~MarkerListHolder() {} + virtual ~MarkerListHolder() = default; /** Objects can implement this method to provide a MarkerList. */ virtual MarkerList* getMarkers (bool xAxis) = 0; diff --git a/modules/juce_gui_basics/positioning/juce_RelativePointPath.h b/modules/juce_gui_basics/positioning/juce_RelativePointPath.h index 813d6af41f..83a5b4b784 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativePointPath.h +++ b/modules/juce_gui_basics/positioning/juce_RelativePointPath.h @@ -81,7 +81,7 @@ public: { public: ElementBase (ElementType type); - virtual ~ElementBase() {} + virtual ~ElementBase() = default; virtual void addToPath (Path& path, Expression::Scope*) const = 0; virtual RelativePoint* getControlPoints (int& numPoints) = 0; virtual ElementBase* clone() const = 0; @@ -129,9 +129,9 @@ public: { public: LineTo (const RelativePoint& endPoint); - void addToPath (Path& path, Expression::Scope*) const; - RelativePoint* getControlPoints (int& numPoints); - ElementBase* clone() const; + void addToPath (Path& path, Expression::Scope*) const override; + RelativePoint* getControlPoints (int& numPoints) override; + ElementBase* clone() const override; RelativePoint endPoint; diff --git a/modules/juce_gui_basics/properties/juce_PropertyComponent.h b/modules/juce_gui_basics/properties/juce_PropertyComponent.h index d1e3ca7db8..55e5e25f66 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_PropertyComponent.h @@ -123,7 +123,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawPropertyPanelSectionHeader (Graphics&, const String& name, bool isOpen, int width, int height) = 0; virtual void drawPropertyComponentBackground (Graphics&, int width, int height, PropertyComponent&) = 0; diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h index 195ca37117..9b57cc1640 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.h @@ -133,7 +133,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when text has finished being entered (i.e. not per keypress) has changed. */ virtual void textPropertyComponentChanged (TextPropertyComponent*) = 0; diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index 0ed43d4851..043eb126ab 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -288,7 +288,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when a ComboBox has its selected item changed. */ virtual void comboBoxChanged (ComboBox* comboBoxThatHasChanged) = 0; @@ -365,7 +365,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawComboBox (Graphics&, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h index 79af5f1c52..aa258cf535 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.h +++ b/modules/juce_gui_basics/widgets/juce_Label.h @@ -184,7 +184,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when a Label's text has changed. */ virtual void labelTextChanged (Label* labelThatHasChanged) = 0; @@ -276,7 +276,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawLabel (Graphics&, Label&) = 0; virtual Font getLabelFont (Label&) = 0; diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.h b/modules/juce_gui_basics/widgets/juce_ListBox.h index a70525ffb4..f9f5758946 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.h +++ b/modules/juce_gui_basics/widgets/juce_ListBox.h @@ -40,7 +40,7 @@ class JUCE_API ListBoxModel public: //============================================================================== /** Destructor. */ - virtual ~ListBoxModel() {} + virtual ~ListBoxModel() = default; //============================================================================== /** This has to return the number of items in the list. diff --git a/modules/juce_gui_basics/widgets/juce_ProgressBar.h b/modules/juce_gui_basics/widgets/juce_ProgressBar.h index 51e3b7765b..79b791d2d2 100644 --- a/modules/juce_gui_basics/widgets/juce_ProgressBar.h +++ b/modules/juce_gui_basics/widgets/juce_ProgressBar.h @@ -102,7 +102,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; /** Draws a progress bar. diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index 63b2b1812e..655b5c1830 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -558,7 +558,7 @@ public: public: //============================================================================== /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; //============================================================================== /** Called when the slider's value is changed. @@ -890,7 +890,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; //============================================================================== virtual void drawLinearSlider (Graphics&, diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h index 27fa913c1f..01057d5109 100644 --- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h +++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h @@ -306,10 +306,10 @@ public: { public: //============================================================================== - Listener() {} + Listener() = default; /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; //============================================================================== /** This is called when some of the table's columns are added, removed, hidden, @@ -390,7 +390,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) = 0; diff --git a/modules/juce_gui_basics/widgets/juce_TableListBox.h b/modules/juce_gui_basics/widgets/juce_TableListBox.h index 438b5132bd..08ffd742ff 100644 --- a/modules/juce_gui_basics/widgets/juce_TableListBox.h +++ b/modules/juce_gui_basics/widgets/juce_TableListBox.h @@ -42,10 +42,10 @@ class JUCE_API TableListBoxModel { public: //============================================================================== - TableListBoxModel() {} + TableListBoxModel() = default; /** Destructor. */ - virtual ~TableListBoxModel() {} + virtual ~TableListBoxModel() = default; //============================================================================== /** This must return the number of rows currently in the table. diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h index 23e7e53300..e6d280428e 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.h +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h @@ -295,7 +295,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when the user changes the text in some way. */ virtual void textEditorTextChanged (TextEditor&) {} @@ -569,8 +569,8 @@ public: class JUCE_API InputFilter { public: - InputFilter() {} - virtual ~InputFilter() {} + InputFilter() = default; + virtual ~InputFilter() = default; /** This method is called whenever text is entered into the editor. An implementation of this class should should check the input string, @@ -632,7 +632,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void fillTextEditorBackground (Graphics&, int width, int height, TextEditor&) = 0; virtual void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) = 0; diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.h b/modules/juce_gui_basics/widgets/juce_Toolbar.h index bf9d910d83..c21b706769 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.h +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.h @@ -274,7 +274,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void paintToolbarBackground (Graphics&, int width, int height, Toolbar&) = 0; diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.h b/modules/juce_gui_basics/widgets/juce_TreeView.h index aa103a4905..741ce99c1c 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.h +++ b/modules/juce_gui_basics/widgets/juce_TreeView.h @@ -858,7 +858,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawTreeviewPlusMinusBox (Graphics&, const Rectangle& area, Colour backgroundColour, bool isItemOpen, bool isMouseOver) = 0; diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.h b/modules/juce_gui_basics/windows/juce_AlertWindow.h index 9e0b7aee01..3282339701 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.h +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.h @@ -423,7 +423,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual AlertWindow* createAlertWindow (const String& title, const String& message, const String& button1, diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.h b/modules/juce_gui_basics/windows/juce_CallOutBox.h index a723b2a885..f917c41bac 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.h +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.h @@ -141,7 +141,7 @@ public: /** This abstract base class is implemented by LookAndFeel classes. */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) = 0; virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0; diff --git a/modules/juce_gui_basics/windows/juce_ComponentPeer.h b/modules/juce_gui_basics/windows/juce_ComponentPeer.h index 26a07ee1e9..28748ef8f5 100644 --- a/modules/juce_gui_basics/windows/juce_ComponentPeer.h +++ b/modules/juce_gui_basics/windows/juce_ComponentPeer.h @@ -387,7 +387,7 @@ public: struct JUCE_API ScaleFactorListener { /** Destructor. */ - virtual ~ScaleFactorListener() {} + virtual ~ScaleFactorListener() = default; /** Called when the scale factor changes. */ virtual void nativeScaleFactorChanged (double newScaleFactor) = 0; diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.h b/modules/juce_gui_basics/windows/juce_DocumentWindow.h index 8074f18fee..0d2ba3c885 100644 --- a/modules/juce_gui_basics/windows/juce_DocumentWindow.h +++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.h @@ -232,7 +232,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; virtual void drawDocumentWindowTitleBar (DocumentWindow&, Graphics&, int w, int h, diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.h b/modules/juce_gui_basics/windows/juce_ResizableWindow.h index 4e71533e35..473fdcee99 100644 --- a/modules/juce_gui_basics/windows/juce_ResizableWindow.h +++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.h @@ -326,7 +326,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; //============================================================================== virtual void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) = 0; diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.h b/modules/juce_gui_basics/windows/juce_TooltipWindow.h index 179014e8e3..11f6457c7d 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.h +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.h @@ -117,7 +117,7 @@ public: */ struct JUCE_API LookAndFeelMethods { - virtual ~LookAndFeelMethods() {} + virtual ~LookAndFeelMethods() = default; /** returns the bounds for a tooltip at the given screen coordinate, constrained within the given desktop area. */ virtual Rectangle getTooltipBounds (const String& tipText, Point screenPos, Rectangle parentArea) = 0; diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.h b/modules/juce_gui_extra/code_editor/juce_CodeDocument.h index 43eeccdf8a..9fa037a71d 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.h +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.h @@ -326,8 +326,8 @@ public: class JUCE_API Listener { public: - Listener() {} - virtual ~Listener() {} + Listener() = default; + virtual ~Listener() = default; /** Called by a CodeDocument when text is added. */ virtual void codeDocumentTextInserted (const String& newText, int insertIndex) = 0; diff --git a/modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h b/modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h index e011352327..75bdea6cb8 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h +++ b/modules/juce_gui_extra/code_editor/juce_CodeTokeniser.h @@ -39,8 +39,8 @@ namespace juce class JUCE_API CodeTokeniser { public: - CodeTokeniser() {} - virtual ~CodeTokeniser() {} + CodeTokeniser() = default; + virtual ~CodeTokeniser() = default; //============================================================================== /** Reads the next token from the source and returns its token type. diff --git a/modules/juce_gui_extra/documents/juce_FileBasedDocument.h b/modules/juce_gui_extra/documents/juce_FileBasedDocument.h index 3033b4cb21..05428d80d3 100644 --- a/modules/juce_gui_extra/documents/juce_FileBasedDocument.h +++ b/modules/juce_gui_extra/documents/juce_FileBasedDocument.h @@ -65,7 +65,7 @@ public: const String& saveFileDialogTitle); /** Destructor. */ - virtual ~FileBasedDocument(); + ~FileBasedDocument() override; //============================================================================== /** Returns true if the changed() method has been called since the file was diff --git a/modules/juce_gui_extra/misc/juce_PushNotifications.h b/modules/juce_gui_extra/misc/juce_PushNotifications.h index 2115bd7a18..6529a14851 100644 --- a/modules/juce_gui_extra/misc/juce_PushNotifications.h +++ b/modules/juce_gui_extra/misc/juce_PushNotifications.h @@ -593,7 +593,7 @@ public: */ struct Listener { - virtual ~Listener() {} + virtual ~Listener() = default; /** This callback will be called after you call requestSettingsUsed() or requestPermissionsWithSettings(). @@ -694,7 +694,7 @@ public: private: PushNotifications(); - ~PushNotifications(); + ~PushNotifications() override; ListenerList listeners; diff --git a/modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h b/modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h index 3f7b4d125b..3f84c58789 100644 --- a/modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h +++ b/modules/juce_gui_extra/misc/juce_SystemTrayIconComponent.h @@ -59,7 +59,7 @@ public: SystemTrayIconComponent(); /** Destructor. */ - ~SystemTrayIconComponent(); + ~SystemTrayIconComponent() override; //============================================================================== /** Changes the image shown in the taskbar. */ diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.h b/modules/juce_opengl/opengl/juce_OpenGLContext.h index 48dc1daf67..a6871e80e4 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.h +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.h @@ -336,7 +336,7 @@ private: { using Ptr = ReferenceCountedObjectPtr; virtual void operator() (OpenGLContext&) = 0; - virtual ~AsyncWorker() {} + ~AsyncWorker() override = default; }; template diff --git a/modules/juce_opengl/opengl/juce_OpenGLImage.h b/modules/juce_opengl/opengl/juce_OpenGLImage.h index 12daac2acb..006662ff3f 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLImage.h +++ b/modules/juce_opengl/opengl/juce_OpenGLImage.h @@ -44,7 +44,7 @@ class JUCE_API OpenGLImageType : public ImageType { public: OpenGLImageType(); - ~OpenGLImageType(); + ~OpenGLImageType() override; ImagePixelData::Ptr create (Image::PixelFormat, int width, int height, bool shouldClearImage) const override; int getTypeID() const override; diff --git a/modules/juce_opengl/opengl/juce_OpenGLRenderer.h b/modules/juce_opengl/opengl/juce_OpenGLRenderer.h index 662d02dbd0..ff4def7c0b 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLRenderer.h +++ b/modules/juce_opengl/opengl/juce_OpenGLRenderer.h @@ -39,8 +39,8 @@ namespace juce class JUCE_API OpenGLRenderer { public: - OpenGLRenderer() {} - virtual ~OpenGLRenderer() {} + OpenGLRenderer() = default; + virtual ~OpenGLRenderer() = default; /** Called when a new GL context has been created. You can use this as an opportunity to create your textures, shaders, etc. diff --git a/modules/juce_opengl/utils/juce_OpenGLAppComponent.h b/modules/juce_opengl/utils/juce_OpenGLAppComponent.h index 51bc536a8f..dafaa6880a 100644 --- a/modules/juce_opengl/utils/juce_OpenGLAppComponent.h +++ b/modules/juce_opengl/utils/juce_OpenGLAppComponent.h @@ -44,7 +44,7 @@ public: OpenGLAppComponent(); /** Destructor. */ - ~OpenGLAppComponent(); + ~OpenGLAppComponent() override; /** Returns the number of times that the render method has been called since the component started running. diff --git a/modules/juce_osc/osc/juce_OSCReceiver.h b/modules/juce_osc/osc/juce_OSCReceiver.h index 3cae53967e..a98359acb9 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.h +++ b/modules/juce_osc/osc/juce_OSCReceiver.h @@ -110,7 +110,7 @@ public: { public: /** Destructor. */ - virtual ~Listener() {} + virtual ~Listener() = default; /** Called when the OSCReceiver receives a new OSC message. You must implement this function. @@ -150,7 +150,7 @@ public: { public: /** Destructor. */ - virtual ~ListenerWithOSCAddress() {} + virtual ~ListenerWithOSCAddress() = default; /** Called when the OSCReceiver receives an OSC message with an OSC address pattern that matches the OSC address with which this listener was added. diff --git a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.h b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.h index 3550c3550c..b3b3d7c0f2 100644 --- a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.h +++ b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.h @@ -61,7 +61,7 @@ public: bool overlayHasCancelButton = false); /** Destructor. */ - ~OnlineUnlockForm(); + ~OnlineUnlockForm() override; /** This is called when the form is dismissed (either cancelled or when registration succeeds). diff --git a/modules/juce_video/playback/juce_VideoComponent.h b/modules/juce_video/playback/juce_VideoComponent.h index d3fb329289..c8095ce709 100644 --- a/modules/juce_video/playback/juce_VideoComponent.h +++ b/modules/juce_video/playback/juce_VideoComponent.h @@ -57,7 +57,7 @@ public: VideoComponent (bool useNativeControlsIfAvailable); /** Destructor. */ - ~VideoComponent(); + ~VideoComponent() override; //============================================================================== /** Tries to load a video from a local file.