From 6bf9bb9a2ee5b56e04e688506932d89f65826652 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 6 Oct 2023 13:08:34 +0100 Subject: [PATCH] Add final specifiers in implementation files --- examples/Assets/DSPDemos_Common.h | 2 +- examples/Audio/MidiDemo.h | 4 +- examples/CMake/GuiApp/Main.cpp | 4 +- .../app/src/main/assets/DSPDemos_Common.h | 2 +- .../DemoRunner/Source/Demos/IntroScreen.h | 6 +- .../Source/UI/DemoContentComponent.cpp | 4 +- .../Source/UI/DemoContentComponent.h | 2 +- .../DemoRunner/Source/UI/MainComponent.cpp | 8 +- examples/DemoRunner/Source/UI/MainComponent.h | 2 +- .../DemoRunner/Source/UI/SettingsContent.h | 10 +- examples/GUI/AccessibilityDemo.h | 10 +- examples/GUI/ComponentTransformsDemo.h | 2 +- examples/GUI/OpenGLDemo.h | 22 ++-- examples/GUI/WidgetsDemo.h | 20 ++-- examples/GUI/WindowsDemo.h | 4 +- examples/Plugins/DSPModulePluginDemo.h | 2 +- examples/Utilities/ChildProcessDemo.h | 4 +- examples/Utilities/PushNotificationsDemo.h | 2 +- extras/AudioPerformanceTest/Source/Main.cpp | 4 +- .../app/src/main/assets/DSPDemos_Common.h | 2 +- .../Source/Plugins/InternalPlugins.cpp | 4 +- .../Source/UI/GraphEditorPanel.cpp | 2 +- .../Source/UI/MainHostWindow.cpp | 2 +- .../juce_build_tools/utils/juce_ProjectType.h | 10 +- .../Source/ClientComponent.h | 2 +- extras/NetworkGraphicsDemo/Source/Demos.h | 2 +- .../Source/Application/jucer_Application.cpp | 2 +- .../Source/Application/jucer_Application.h | 2 +- .../juce_ThreadedAnalyticsDestination.cpp | 4 +- .../buffers/juce_AudioChannelSet.cpp | 2 +- .../buffers/juce_AudioDataConverters.cpp | 2 +- .../buffers/juce_FloatVectorOperations.cpp | 2 +- .../midi/juce_MidiBuffer.cpp | 2 +- .../juce_audio_basics/midi/juce_MidiBuffer.h | 2 +- .../juce_audio_basics/midi/juce_MidiFile.cpp | 2 +- .../midi/juce_MidiMessage.cpp | 2 +- .../midi/juce_MidiMessageSequence.cpp | 2 +- .../juce_audio_basics/midi/juce_MidiRPN.cpp | 4 +- .../midi/ump/juce_UMP_test.cpp | 2 +- .../mpe/juce_MPEInstrument.cpp | 6 +- .../mpe/juce_MPEMessages.cpp | 2 +- .../juce_audio_basics/mpe/juce_MPENote.cpp | 2 +- .../mpe/juce_MPESynthesiserBase.cpp | 4 +- .../juce_audio_basics/mpe/juce_MPEUtils.cpp | 2 +- .../juce_audio_basics/mpe/juce_MPEValue.cpp | 2 +- .../mpe/juce_MPEZoneLayout.cpp | 2 +- .../sources/juce_MemoryAudioSource.cpp | 2 +- .../utilities/juce_ADSR_test.cpp | 2 +- .../utilities/juce_Interpolators.cpp | 2 +- .../utilities/juce_SmoothedValue.cpp | 2 +- .../audio_io/juce_AudioDeviceManager.cpp | 16 +-- .../midi_io/juce_MidiDevices.cpp | 2 +- .../native/juce_ALSA_linux.cpp | 6 +- .../native/juce_ASIO_windows.cpp | 6 +- .../native/juce_Audio_android.cpp | 8 +- .../native/juce_Audio_ios.cpp | 8 +- .../native/juce_Bela_linux.cpp | 4 +- .../native/juce_CoreAudio_mac.cpp | 24 ++-- .../native/juce_CoreMidi_mac.mm | 4 +- .../native/juce_DirectSound_windows.cpp | 6 +- .../native/juce_JackAudio_linux.cpp | 6 +- .../native/juce_Midi_linux.cpp | 8 +- .../native/juce_Midi_windows.cpp | 38 ++++--- .../native/juce_Oboe_android.cpp | 12 +- .../native/juce_OpenSL_android.cpp | 16 +-- .../native/juce_WASAPI_windows.cpp | 12 +- .../codecs/juce_AiffAudioFormat.cpp | 6 +- .../codecs/juce_CoreAudioFormat.cpp | 4 +- .../codecs/juce_FlacAudioFormat.cpp | 4 +- .../codecs/juce_LAMEEncoderAudioFormat.cpp | 2 +- .../codecs/juce_MP3AudioFormat.cpp | 2 +- .../codecs/juce_OggVorbisAudioFormat.cpp | 4 +- .../codecs/juce_WavAudioFormat.cpp | 8 +- .../codecs/juce_WindowsMediaAudioFormat.cpp | 4 +- .../format/juce_AudioFormatWriter.cpp | 2 +- .../juce_BufferingAudioFormatReader.cpp | 6 +- .../juce_audio_plugin_client_AAX.cpp | 14 +-- .../juce_audio_plugin_client_AU_1.mm | 16 +-- .../juce_audio_plugin_client_AUv3.mm | 12 +- .../juce_audio_plugin_client_LV2.cpp | 10 +- .../juce_audio_plugin_client_Standalone.cpp | 2 +- .../juce_audio_plugin_client_Unity.cpp | 8 +- .../juce_audio_plugin_client_VST2.cpp | 14 +-- .../juce_audio_plugin_client_VST3.cpp | 74 ++++++------- .../format/juce_AudioPluginFormat.cpp | 2 +- .../format/juce_AudioPluginFormatManager.cpp | 2 +- .../format_types/juce_ARAHosting.cpp | 4 +- .../juce_AudioUnitPluginFormat.mm | 14 +-- .../format_types/juce_LADSPAPluginFormat.cpp | 2 +- .../format_types/juce_LV2PluginFormat.cpp | 54 ++++----- .../juce_LV2PluginFormat_test.cpp | 2 +- .../juce_LegacyAudioParameter.cpp | 2 +- .../format_types/juce_VST3PluginFormat.cpp | 42 +++---- .../juce_VST3PluginFormat_test.cpp | 2 +- .../format_types/juce_VSTPluginFormat.cpp | 22 ++-- .../juce_audio_processors.cpp | 6 +- .../processors/juce_AudioProcessorGraph.cpp | 30 ++--- .../juce_AudioProcessorParameterGroup.cpp | 4 +- .../juce_GenericAudioProcessorEditor.cpp | 24 ++-- .../scanning/juce_PluginListComponent.cpp | 4 +- .../ARA/juce_ARADocumentControllerCommon.cpp | 2 +- .../utilities/juce_AAXClientExtensions.cpp | 2 +- .../utilities/juce_AudioParameterChoice.cpp | 2 +- .../utilities/juce_AudioParameterInt.cpp | 2 +- .../juce_AudioProcessorValueTreeState.cpp | 10 +- .../gui/juce_AudioDeviceSelectorComponent.cpp | 12 +- .../gui/juce_AudioThumbnail.cpp | 4 +- .../gui/juce_KeyboardComponentBase.cpp | 2 +- .../gui/juce_MPEKeyboardComponent.cpp | 2 +- .../native/juce_AudioCDBurner_mac.mm | 2 +- .../native/juce_AudioCDReader_windows.cpp | 8 +- ...toothMidiDevicePairingDialogue_android.cpp | 12 +- ..._BluetoothMidiDevicePairingDialogue_ios.mm | 2 +- ..._BluetoothMidiDevicePairingDialogue_mac.mm | 4 +- .../players/juce_AudioProcessorPlayer.cpp | 4 +- .../players/juce_SoundPlayer.cpp | 8 +- .../containers/juce_AbstractFifo.cpp | 4 +- .../juce_core/containers/juce_ArrayBase.cpp | 4 +- .../juce_FixedSizeFunction_test.cpp | 2 +- .../containers/juce_HashMap_test.cpp | 2 +- .../containers/juce_ListenerList.cpp | 2 +- .../containers/juce_Optional_test.cpp | 4 +- .../juce_core/containers/juce_OwnedArray.cpp | 2 +- .../containers/juce_ReferenceCountedArray.cpp | 6 +- .../juce_core/containers/juce_SparseSet.cpp | 2 +- modules/juce_core/containers/juce_Variant.cpp | 2 +- modules/juce_core/files/juce_File.cpp | 2 +- .../juce_core/files/juce_FileInputStream.cpp | 2 +- .../juce_core/files/juce_FileSearchPath.cpp | 2 +- modules/juce_core/javascript/juce_JSON.cpp | 2 +- .../juce_JSONSerialisation_test.cpp | 2 +- .../juce_core/javascript/juce_JSONUtils.cpp | 2 +- .../juce_core/javascript/juce_Javascript.cpp | 104 +++++++++--------- modules/juce_core/maths/juce_BigInteger.cpp | 2 +- modules/juce_core/maths/juce_Expression.cpp | 32 +++--- modules/juce_core/maths/juce_Random.cpp | 2 +- .../juce_core/misc/juce_EnumHelpers_test.cpp | 2 +- .../juce_core/native/juce_Files_android.cpp | 6 +- modules/juce_core/native/juce_Network_mac.mm | 14 +-- .../juce_core/native/juce_ObjCHelpers_mac.h | 2 +- .../juce_RuntimePermissions_android.cpp | 2 +- .../juce_core/native/juce_Threads_android.cpp | 2 +- modules/juce_core/network/juce_IPAddress.cpp | 2 +- modules/juce_core/network/juce_NamedPipe.cpp | 8 +- modules/juce_core/network/juce_Socket.cpp | 2 +- modules/juce_core/network/juce_URL.cpp | 8 +- .../streams/juce_BufferedInputStream.cpp | 2 +- .../streams/juce_MemoryInputStream.cpp | 2 +- .../streams/juce_SubregionStream.cpp | 2 +- modules/juce_core/system/juce_SystemStats.cpp | 2 +- modules/juce_core/text/juce_Base64.cpp | 2 +- .../text/juce_CharacterFunctions.cpp | 2 +- modules/juce_core/text/juce_String.cpp | 4 +- .../juce_core/text/juce_StringPairArray.cpp | 2 +- modules/juce_core/text/juce_TextDiff.cpp | 2 +- .../juce_core/threads/juce_ChildProcess.cpp | 2 +- .../threads/juce_HighResolutionTimer.cpp | 4 +- modules/juce_core/threads/juce_Thread.cpp | 10 +- modules/juce_core/threads/juce_ThreadPool.cpp | 6 +- modules/juce_core/time/juce_Time.cpp | 2 +- modules/juce_core/xml/juce_XmlElement.cpp | 2 +- .../zip/juce_GZIPCompressorOutputStream.cpp | 2 +- .../zip/juce_GZIPDecompressorInputStream.cpp | 2 +- modules/juce_core/zip/juce_ZipFile.cpp | 4 +- .../encryption/juce_BlowFish.cpp | 2 +- .../juce_cryptography/hashing/juce_MD5.cpp | 2 +- .../juce_cryptography/hashing/juce_SHA256.cpp | 2 +- .../hashing/juce_Whirlpool.cpp | 2 +- .../values/juce_CachedValue.cpp | 2 +- .../values/juce_Value.cpp | 2 +- .../values/juce_ValueTree.cpp | 14 +-- ...juce_ValueTreePropertyWithDefault_test.cpp | 2 +- .../containers/juce_AudioBlock_test.cpp | 2 +- .../containers/juce_SIMDRegister_test.cpp | 2 +- .../juce_dsp/frequency/juce_Convolution.cpp | 4 +- .../frequency/juce_Convolution_test.cpp | 2 +- modules/juce_dsp/frequency/juce_FFT.cpp | 8 +- modules/juce_dsp/frequency/juce_FFT_test.cpp | 2 +- .../maths/juce_LogRampedValue_test.cpp | 2 +- modules/juce_dsp/maths/juce_Matrix_test.cpp | 2 +- .../juce_dsp/processors/juce_DryWetMixer.cpp | 2 +- .../processors/juce_FIRFilter_test.cpp | 2 +- .../juce_dsp/processors/juce_Oversampling.cpp | 6 +- .../processors/juce_ProcessorChain_test.cpp | 2 +- .../broadcasters/juce_ActionBroadcaster.cpp | 2 +- .../broadcasters/juce_AsyncUpdater.cpp | 2 +- .../juce_ConnectedChildProcess.cpp | 12 +- .../juce_InterprocessConnection.cpp | 8 +- .../messages/juce_ApplicationBase.cpp | 2 +- .../messages/juce_MessageManager.cpp | 8 +- .../native/juce_MessageManager_mac.mm | 6 +- .../native/juce_Messaging_android.cpp | 8 +- .../native/juce_Messaging_windows.cpp | 2 +- .../juce_events/timers/juce_MultiTimer.cpp | 2 +- modules/juce_events/timers/juce_Timer.cpp | 10 +- modules/juce_graphics/colour/juce_Colour.cpp | 2 +- modules/juce_graphics/fonts/juce_Font.cpp | 2 +- .../geometry/juce_AffineTransform.cpp | 2 +- .../geometry/juce_Rectangle_test.cpp | 2 +- .../image_formats/juce_JPEGLoader.cpp | 2 +- modules/juce_graphics/images/juce_Image.cpp | 4 +- .../native/juce_CoreGraphicsContext_mac.mm | 6 +- .../juce_DirectWriteTypeLayout_windows.cpp | 2 +- .../juce_DirectWriteTypeface_windows.cpp | 4 +- .../native/juce_Fonts_android.cpp | 2 +- .../native/juce_Fonts_freetype.cpp | 8 +- .../juce_graphics/native/juce_Fonts_mac.mm | 2 +- .../native/juce_Fonts_windows.cpp | 2 +- .../juce_gui_basics/buttons/juce_Button.cpp | 8 +- .../juce_ApplicationCommandTarget.cpp | 2 +- .../components/juce_Component.cpp | 2 +- .../components/juce_FocusTraverser.cpp | 4 +- .../components/juce_ModalComponentManager.cpp | 2 +- .../drawables/juce_DrawableText.cpp | 2 +- .../filebrowser/juce_FileChooser.cpp | 4 +- .../filebrowser/juce_FileChooserDialogBox.cpp | 2 +- .../filebrowser/juce_FileListComponent.cpp | 8 +- .../filebrowser/juce_FileTreeComponent.cpp | 12 +- .../keyboard/juce_KeyboardFocusTraverser.cpp | 4 +- .../layout/juce_ComponentAnimator.cpp | 2 +- .../layout/juce_ConcertinaPanel.cpp | 2 +- .../juce_gui_basics/layout/juce_FlexBox.cpp | 2 +- modules/juce_gui_basics/layout/juce_Grid.cpp | 2 +- .../juce_gui_basics/layout/juce_ScrollBar.cpp | 4 +- .../layout/juce_TabbedButtonBar.cpp | 2 +- .../layout/juce_TabbedComponent.cpp | 2 +- .../juce_gui_basics/layout/juce_Viewport.cpp | 4 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 6 +- .../lookandfeel/juce_LookAndFeel_V3.cpp | 2 +- .../lookandfeel/juce_LookAndFeel_V4.cpp | 2 +- .../menus/juce_BurgerMenuComponent.cpp | 2 +- .../menus/juce_MenuBarComponent.cpp | 6 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 14 +-- .../misc/juce_DropShadower.cpp | 4 +- .../misc/juce_FocusOutline.cpp | 2 +- .../mouse/juce_DragAndDropContainer.cpp | 4 +- .../accessibility/juce_Accessibility.cpp | 6 +- .../juce_AccessibilityElement_windows.cpp | 8 +- .../juce_AccessibilitySharedCode_mac.mm | 2 +- .../juce_AccessibilityTextHelpers_test.cpp | 4 +- .../accessibility/juce_Accessibility_ios.mm | 72 ++++++------ .../accessibility/juce_Accessibility_mac.mm | 2 +- .../juce_Accessibility_windows.cpp | 2 +- .../native/juce_ContentSharer_android.cpp | 6 +- .../native/juce_ContentSharer_ios.cpp | 4 +- .../native/juce_DragAndDrop_windows.cpp | 10 +- .../native/juce_FileChooser_android.cpp | 2 +- .../native/juce_FileChooser_ios.mm | 8 +- .../native/juce_FileChooser_linux.cpp | 4 +- .../native/juce_FileChooser_mac.mm | 6 +- .../native/juce_FileChooser_windows.cpp | 12 +- .../native/juce_MainMenu_mac.mm | 12 +- .../native/juce_NSViewComponentPeer_mac.mm | 14 +-- .../native/juce_NativeMessageBox_android.cpp | 2 +- .../native/juce_NativeMessageBox_ios.mm | 2 +- .../native/juce_NativeMessageBox_linux.cpp | 2 +- .../native/juce_NativeMessageBox_mac.mm | 2 +- .../native/juce_NativeMessageBox_windows.cpp | 6 +- .../native/juce_UIViewComponentPeer_ios.mm | 6 +- .../native/juce_Windowing_android.cpp | 16 +-- .../native/juce_Windowing_ios.mm | 4 +- .../native/juce_Windowing_linux.cpp | 6 +- .../native/juce_Windowing_mac.mm | 8 +- .../native/juce_Windowing_windows.cpp | 32 +++--- .../native/juce_WindowsHooks_windows.cpp | 2 +- .../native/juce_XWindowSystem_linux.cpp | 2 +- .../juce_RelativeCoordinatePositioner.cpp | 4 +- .../positioning/juce_RelativeRectangle.cpp | 4 +- .../juce_ChoicePropertyComponent.cpp | 8 +- .../juce_MultiChoicePropertyComponent.cpp | 8 +- .../properties/juce_PropertyPanel.cpp | 4 +- .../properties/juce_TextPropertyComponent.cpp | 6 +- .../juce_gui_basics/widgets/juce_ComboBox.cpp | 4 +- .../widgets/juce_ImageComponent.cpp | 2 +- .../juce_gui_basics/widgets/juce_Label.cpp | 6 +- .../juce_gui_basics/widgets/juce_ListBox.cpp | 18 +-- .../widgets/juce_ProgressBar.cpp | 4 +- .../juce_gui_basics/widgets/juce_Slider.cpp | 8 +- .../widgets/juce_TableHeaderComponent.cpp | 2 +- .../widgets/juce_TableListBox.cpp | 12 +- .../widgets/juce_TextEditor.cpp | 16 +-- .../juce_gui_basics/widgets/juce_Toolbar.cpp | 6 +- .../juce_gui_basics/widgets/juce_TreeView.cpp | 24 ++-- .../windows/juce_AlertWindow.cpp | 2 +- .../windows/juce_CallOutBox.cpp | 4 +- .../windows/juce_DialogWindow.cpp | 2 +- .../windows/juce_DocumentWindow.cpp | 2 +- .../windows/juce_NativeMessageBox.cpp | 2 +- .../code_editor/juce_CodeDocument.cpp | 6 +- .../code_editor/juce_CodeEditorComponent.cpp | 6 +- .../misc/juce_ColourSelector.cpp | 14 +-- .../misc/juce_KeyMappingEditorComponent.cpp | 14 +-- .../misc/juce_LiveConstantEditor.cpp | 18 +-- .../native/juce_ActiveXComponent_windows.cpp | 8 +- .../native/juce_NSViewComponent_mac.mm | 4 +- .../native/juce_PushNotifications_ios.cpp | 2 +- .../native/juce_PushNotifications_mac.cpp | 2 +- .../native/juce_SystemTrayIcon_mac.cpp | 10 +- .../juce_WebBrowserComponent_android.cpp | 2 +- .../native/juce_WebBrowserComponent_linux.cpp | 4 +- .../native/juce_WebBrowserComponent_mac.mm | 10 +- .../juce_WebBrowserComponent_windows.cpp | 16 +-- .../native/juce_XEmbedComponent_linux.cpp | 2 +- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 16 +-- .../opengl/juce_OpenGLGraphicsContext.cpp | 48 ++++---- .../juce_opengl/opengl/juce_OpenGLImage.cpp | 4 +- modules/juce_osc/osc/juce_OSCAddress.cpp | 6 +- modules/juce_osc/osc/juce_OSCArgument.cpp | 2 +- modules/juce_osc/osc/juce_OSCBundle.cpp | 4 +- modules/juce_osc/osc/juce_OSCMessage.cpp | 2 +- modules/juce_osc/osc/juce_OSCReceiver.cpp | 4 +- modules/juce_osc/osc/juce_OSCSender.cpp | 4 +- modules/juce_osc/osc/juce_OSCTimeTag.cpp | 2 +- .../marketplace/juce_OnlineUnlockForm.cpp | 12 +- .../native/juce_InAppPurchases_ios.cpp | 2 +- 315 files changed, 1031 insertions(+), 1025 deletions(-) diff --git a/examples/Assets/DSPDemos_Common.h b/examples/Assets/DSPDemos_Common.h index e24eb78a20..1f6ff14280 100644 --- a/examples/Assets/DSPDemos_Common.h +++ b/examples/Assets/DSPDemos_Common.h @@ -148,7 +148,7 @@ public: { transportSource = newSource; - struct ResetCallback : public CallbackMessage + struct ResetCallback final : public CallbackMessage { ResetCallback (AudioThumbnailComponent& o) : owner (o) {} void messageCallback() override { owner.reset(); } diff --git a/examples/Audio/MidiDemo.h b/examples/Audio/MidiDemo.h index 27524c92a3..baa94c2fac 100644 --- a/examples/Audio/MidiDemo.h +++ b/examples/Audio/MidiDemo.h @@ -233,8 +233,8 @@ public: private: //============================================================================== - struct MidiDeviceListBox : private ListBoxModel, - public ListBox + struct MidiDeviceListBox final : private ListBoxModel, + public ListBox { MidiDeviceListBox (const String& name, MidiDemo& contentComponent, diff --git a/examples/CMake/GuiApp/Main.cpp b/examples/CMake/GuiApp/Main.cpp index 72aa7bbd74..6930f3e0db 100644 --- a/examples/CMake/GuiApp/Main.cpp +++ b/examples/CMake/GuiApp/Main.cpp @@ -1,7 +1,7 @@ #include "MainComponent.h" //============================================================================== -class GuiAppApplication : public juce::JUCEApplication +class GuiAppApplication final : public juce::JUCEApplication { public: //============================================================================== @@ -51,7 +51,7 @@ public: This class implements the desktop window that contains an instance of our MainComponent class. */ - class MainWindow : public juce::DocumentWindow + class MainWindow final : public juce::DocumentWindow { public: explicit MainWindow (juce::String name) diff --git a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h index e24eb78a20..1f6ff14280 100644 --- a/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h +++ b/examples/DemoRunner/Builds/Android/app/src/main/assets/DSPDemos_Common.h @@ -148,7 +148,7 @@ public: { transportSource = newSource; - struct ResetCallback : public CallbackMessage + struct ResetCallback final : public CallbackMessage { ResetCallback (AudioThumbnailComponent& o) : owner (o) {} void messageCallback() override { owner.reset(); } diff --git a/examples/DemoRunner/Source/Demos/IntroScreen.h b/examples/DemoRunner/Source/Demos/IntroScreen.h index 03437d91ee..719b60f469 100644 --- a/examples/DemoRunner/Source/Demos/IntroScreen.h +++ b/examples/DemoRunner/Source/Demos/IntroScreen.h @@ -27,7 +27,7 @@ //============================================================================== -class IntroScreen : public Component +class IntroScreen final : public Component { public: IntroScreen() @@ -70,8 +70,8 @@ private: HyperlinkButton linkButton { "www.juce.com", { "http://www.juce.com" } }; //============================================================================== - struct LogoDrawComponent : public Component, - private Timer + struct LogoDrawComponent final : public Component, + private Timer { LogoDrawComponent() { diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp index 407a203a85..bbfbd9ebed 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp @@ -28,7 +28,7 @@ #include "MainComponent.h" //============================================================================== -struct DemoContent : public Component +struct DemoContent final : public Component { DemoContent() noexcept {} @@ -58,7 +58,7 @@ private: //============================================================================== #if ! (JUCE_ANDROID || JUCE_IOS) -struct CodeContent : public Component +struct CodeContent final : public Component { CodeContent() { diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.h b/examples/DemoRunner/Source/UI/DemoContentComponent.h index 77f1cd577b..67d9d978fa 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.h +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.h @@ -32,7 +32,7 @@ struct DemoContent; struct CodeContent; //============================================================================== -class DemoContentComponent : public TabbedComponent +class DemoContentComponent final : public TabbedComponent { public: DemoContentComponent (Component& mainComponent, std::function demoChangedCallback); diff --git a/examples/DemoRunner/Source/UI/MainComponent.cpp b/examples/DemoRunner/Source/UI/MainComponent.cpp index b9a192f3fd..3428b41b2a 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.cpp +++ b/examples/DemoRunner/Source/UI/MainComponent.cpp @@ -26,7 +26,7 @@ #include "MainComponent.h" //============================================================================== -struct SidePanelHeader : public Component +struct SidePanelHeader final : public Component { SidePanelHeader (MainComponent& o) : owner (o) @@ -132,8 +132,8 @@ struct SidePanelHeader : public Component }; //============================================================================== -class DemoList : public Component, - public ListBoxModel +class DemoList final : public Component, + public ListBoxModel { public: DemoList (DemoContentComponent& holder) @@ -214,7 +214,7 @@ public: private: //============================================================================== - class CategoryListHeaderComponent : public Button + class CategoryListHeaderComponent final : public Button { public: explicit CategoryListHeaderComponent (DemoList& o) diff --git a/examples/DemoRunner/Source/UI/MainComponent.h b/examples/DemoRunner/Source/UI/MainComponent.h index e1f3a9c1b4..9f9a938805 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.h +++ b/examples/DemoRunner/Source/UI/MainComponent.h @@ -29,7 +29,7 @@ #include "DemoContentComponent.h" //============================================================================== -class MainComponent : public Component +class MainComponent final : public Component { public: //============================================================================== diff --git a/examples/DemoRunner/Source/UI/SettingsContent.h b/examples/DemoRunner/Source/UI/SettingsContent.h index a90d5b2b57..2cd068c03d 100644 --- a/examples/DemoRunner/Source/UI/SettingsContent.h +++ b/examples/DemoRunner/Source/UI/SettingsContent.h @@ -28,7 +28,7 @@ #include "MainComponent.h" //============================================================================== -class SettingsContent : public Component +class SettingsContent final : public Component { public: SettingsContent (MainComponent& topLevelComponent) @@ -67,8 +67,8 @@ private: static constexpr int itemHeight = 30; static constexpr int itemSpacing = 7; - class GraphicsSettingsGroup : public Component, - private ComponentMovementWatcher + class GraphicsSettingsGroup final : public Component, + private ComponentMovementWatcher { public: GraphicsSettingsGroup (MainComponent& comp) @@ -179,7 +179,7 @@ private: OwnedArray lookAndFeels; }; - class AudioSettingsGroup : public Component + class AudioSettingsGroup final : public Component { public: AudioSettingsGroup() @@ -211,7 +211,7 @@ private: }; //============================================================================== - class InnerContent : public Component + class InnerContent final : public Component { public: InnerContent (MainComponent& mainComponent) diff --git a/examples/GUI/AccessibilityDemo.h b/examples/GUI/AccessibilityDemo.h index 9458966a48..cc0a4fcda5 100644 --- a/examples/GUI/AccessibilityDemo.h +++ b/examples/GUI/AccessibilityDemo.h @@ -339,7 +339,7 @@ private: { RootItem() { - struct Item : public TreeViewItem + struct Item final : public TreeViewItem { Item (int index, int depth, int numSubItems) : textToDisplay ("Item " + String (index) @@ -511,7 +511,7 @@ private: and accessibility clients. This derived class represents the properties set via the demo UI. */ - struct CustomAccessibilityHandler : public AccessibilityHandler + struct CustomAccessibilityHandler final : public AccessibilityHandler { explicit CustomAccessibilityHandler (CustomWidgetComponent& comp) : AccessibilityHandler (comp.accessibleComponent, @@ -821,7 +821,7 @@ private: std::unique_ptr getValueInterface() { - struct Numeric : public AccessibilityNumericValueInterface + struct Numeric final : public AccessibilityNumericValueInterface { explicit Numeric (ValueInterfaceComponent& o) : owner (o) @@ -835,7 +835,7 @@ private: ValueInterfaceComponent& owner; }; - struct Ranged : public AccessibilityRangedNumericValueInterface + struct Ranged final : public AccessibilityRangedNumericValueInterface { explicit Ranged (ValueInterfaceComponent& o) : owner (o) @@ -857,7 +857,7 @@ private: ValueInterfaceComponent& owner; }; - struct Text : public AccessibilityTextValueInterface + struct Text final : public AccessibilityTextValueInterface { explicit Text (ValueInterfaceComponent& o) : owner (o) diff --git a/examples/GUI/ComponentTransformsDemo.h b/examples/GUI/ComponentTransformsDemo.h index 0a26b131d8..a58b09d2d7 100644 --- a/examples/GUI/ComponentTransformsDemo.h +++ b/examples/GUI/ComponentTransformsDemo.h @@ -98,7 +98,7 @@ public: private: std::unique_ptr content; - struct CornerDragger : public Component + struct CornerDragger final : public Component { CornerDragger() { diff --git a/examples/GUI/OpenGLDemo.h b/examples/GUI/OpenGLDemo.h index 44485b58bb..ed80fcb46b 100644 --- a/examples/GUI/OpenGLDemo.h +++ b/examples/GUI/OpenGLDemo.h @@ -646,7 +646,7 @@ struct OpenGLUtils String name; }; - struct DynamicTexture : public DemoTexture + struct DynamicTexture final : public DemoTexture { DynamicTexture() { name = "Dynamically-generated texture"; } @@ -693,7 +693,7 @@ struct OpenGLUtils return image; } - struct BuiltInTexture : public DemoTexture + struct BuiltInTexture final : public DemoTexture { BuiltInTexture (const char* nm, const void* imageData, size_t imageSize) : image (resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (imageData, imageSize))) @@ -710,7 +710,7 @@ struct OpenGLUtils } }; - struct TextureFromFile : public DemoTexture + struct TextureFromFile final : public DemoTexture { TextureFromFile (const File& file) { @@ -727,7 +727,7 @@ struct OpenGLUtils } }; - struct TextureFromAsset : public DemoTexture + struct TextureFromAsset final : public DemoTexture { TextureFromAsset (const char* assetName) { @@ -749,9 +749,9 @@ struct OpenGLUtils /** This is the main demo component - the GL context gets attached to it, and it implements the OpenGLRenderer callback so that it can do real GL work. */ -class OpenGLDemo : public Component, - private OpenGLRenderer, - private AsyncUpdater +class OpenGLDemo final : public Component, + private OpenGLRenderer, + private AsyncUpdater { public: OpenGLDemo() @@ -982,10 +982,10 @@ private: This component sits on top of the main GL demo, and contains all the sliders and widgets that control things. */ - class DemoControlsOverlay : public Component, - private CodeDocument::Listener, - private Slider::Listener, - private Timer + class DemoControlsOverlay final : public Component, + private CodeDocument::Listener, + private Slider::Listener, + private Timer { public: DemoControlsOverlay (OpenGLDemo& d) diff --git a/examples/GUI/WidgetsDemo.h b/examples/GUI/WidgetsDemo.h index 320f9e048b..3c5a4fa51f 100644 --- a/examples/GUI/WidgetsDemo.h +++ b/examples/GUI/WidgetsDemo.h @@ -611,7 +611,7 @@ struct MenuPage final : public Component addAndMakeVisible (customItemButton); customItemButton.onClick = [&] { - struct CustomComponent : public PopupMenu::CustomComponent + struct CustomComponent final : public PopupMenu::CustomComponent { CustomComponent (int widthIn, int heightIn, Colour backgroundIn) : PopupMenu::CustomComponent (false), @@ -925,7 +925,7 @@ private: // Demonstrates how to put a custom component into a toolbar - this one contains // a ComboBox. - class CustomToolbarComboBox : public ToolbarItemComponent + class CustomToolbarComboBox final : public ToolbarItemComponent { public: CustomToolbarComboBox (const int toolbarItemId) @@ -1161,7 +1161,7 @@ private: //============================================================================== // This is a custom Label component, which we use for the table's editable text columns. - class EditableTextCustomComponent : public Label + class EditableTextCustomComponent final : public Label { public: EditableTextCustomComponent (TableDemoComponent& td) : owner (td) @@ -1209,7 +1209,7 @@ private: //============================================================================== // This is a custom component containing a combo box, which we're going to put inside // our table's "rating" column. - class RatingColumnCustomComponent : public Component + class RatingColumnCustomComponent final : public Component { public: RatingColumnCustomComponent (TableDemoComponent& td) : owner (td) @@ -1328,7 +1328,7 @@ public: private: //============================================================================== - struct SourceItemListboxContents : public ListBoxModel + struct SourceItemListboxContents final : public ListBoxModel { // The following methods implement the necessary virtual functions from ListBoxModel, // telling the listbox how many rows there are, painting them, etc. @@ -1366,10 +1366,10 @@ private: //============================================================================== // and this is a component that can have things dropped onto it.. - class DragAndDropDemoTarget : public Component, - public DragAndDropTarget, - public FileDragAndDropTarget, - public TextDragAndDropTarget + class DragAndDropDemoTarget final : public Component, + public DragAndDropTarget, + public FileDragAndDropTarget, + public TextDragAndDropTarget { public: DragAndDropDemoTarget() {} @@ -1530,7 +1530,7 @@ struct DemoTabbedComponent final : public TabbedComponent // This is a small star button that is put inside one of the tabs. You can // use this technique to create things like "close tab" buttons, etc. - class CustomTabButton : public Component + class CustomTabButton final : public Component { public: CustomTabButton (bool isRunningComponenTransformsDemo) diff --git a/examples/GUI/WindowsDemo.h b/examples/GUI/WindowsDemo.h index 882ad9f5c7..9838210569 100644 --- a/examples/GUI/WindowsDemo.h +++ b/examples/GUI/WindowsDemo.h @@ -442,8 +442,8 @@ private: }), true); } - class AlertWindowCustomComponent : public Component, - private Slider::Listener + class AlertWindowCustomComponent final : public Component, + private Slider::Listener { public: AlertWindowCustomComponent() diff --git a/examples/Plugins/DSPModulePluginDemo.h b/examples/Plugins/DSPModulePluginDemo.h index 55b0cc1136..926ac05a96 100644 --- a/examples/Plugins/DSPModulePluginDemo.h +++ b/examples/Plugins/DSPModulePluginDemo.h @@ -1705,7 +1705,7 @@ private: } private: - struct ComboWithItems : public ComboBox + struct ComboWithItems final : public ComboBox { explicit ComboWithItems (RangedAudioParameter& param) { diff --git a/examples/Utilities/ChildProcessDemo.h b/examples/Utilities/ChildProcessDemo.h index 4f8770b512..c16520f01a 100644 --- a/examples/Utilities/ChildProcessDemo.h +++ b/examples/Utilities/ChildProcessDemo.h @@ -231,7 +231,7 @@ private: TextEditor testResultsBox; - struct LogMessage : public Message + struct LogMessage final : public Message { LogMessage (const String& m) : message (m) {} @@ -343,7 +343,7 @@ inline bool invokeChildProcessDemo (const String& commandLine) void shutdown() override { mainWindow = nullptr; } private: - class MainWindow : public DocumentWindow + class MainWindow final : public DocumentWindow { public: MainWindow (const String& name, std::unique_ptr c) diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index 434ae055e8..cadb24878b 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -1087,7 +1087,7 @@ private: #endif } - struct ParamsView : public Component + struct ParamsView final : public Component { ParamsView() { diff --git a/extras/AudioPerformanceTest/Source/Main.cpp b/extras/AudioPerformanceTest/Source/Main.cpp index c893b151f5..e513cb172a 100644 --- a/extras/AudioPerformanceTest/Source/Main.cpp +++ b/extras/AudioPerformanceTest/Source/Main.cpp @@ -27,7 +27,7 @@ #include "MainComponent.h" //============================================================================== -class AudioPerformanceTestApplication : public JUCEApplication +class AudioPerformanceTestApplication final : public JUCEApplication { public: //============================================================================== @@ -55,7 +55,7 @@ public: } //============================================================================== - class MainWindow : public DocumentWindow + class MainWindow final : public DocumentWindow { public: explicit MainWindow (String name) diff --git a/extras/AudioPluginHost/Builds/Android/app/src/main/assets/DSPDemos_Common.h b/extras/AudioPluginHost/Builds/Android/app/src/main/assets/DSPDemos_Common.h index e24eb78a20..1f6ff14280 100644 --- a/extras/AudioPluginHost/Builds/Android/app/src/main/assets/DSPDemos_Common.h +++ b/extras/AudioPluginHost/Builds/Android/app/src/main/assets/DSPDemos_Common.h @@ -148,7 +148,7 @@ public: { transportSource = newSource; - struct ResetCallback : public CallbackMessage + struct ResetCallback final : public CallbackMessage { ResetCallback (AudioThumbnailComponent& o) : owner (o) {} void messageCallback() override { owner.reset(); } diff --git a/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp index 6fb35a1a67..52ea0ce45e 100644 --- a/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp +++ b/extras/AudioPluginHost/Source/Plugins/InternalPlugins.cpp @@ -224,7 +224,7 @@ public: private: //============================================================================== - struct SineWaveSound : public SynthesiserSound + struct SineWaveSound final : public SynthesiserSound { SineWaveSound() = default; @@ -232,7 +232,7 @@ private: bool appliesToChannel (int /*midiChannel*/) override { return true; } }; - struct SineWaveVoice : public SynthesiserVoice + struct SineWaveVoice final : public SynthesiserVoice { SineWaveVoice() = default; diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index 115cdc5031..8b59d4bb71 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -70,7 +70,7 @@ return scanner->scanNextFile (true, pluginBeingScanned); } - struct ScanJob : public ThreadPoolJob + struct ScanJob final : public ThreadPoolJob { ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {} diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index 52e660830a..1ca2f1eafc 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -397,7 +397,7 @@ void MainHostWindow::closeButtonPressed() tryToQuitApplication(); } -struct AsyncQuitRetrier : private Timer +struct AsyncQuitRetrier final : private Timer { AsyncQuitRetrier() { startTimer (500); } diff --git a/extras/Build/juce_build_tools/utils/juce_ProjectType.h b/extras/Build/juce_build_tools/utils/juce_ProjectType.h index 0bd67eff71..a5af7bc709 100644 --- a/extras/Build/juce_build_tools/utils/juce_ProjectType.h +++ b/extras/Build/juce_build_tools/utils/juce_ProjectType.h @@ -197,7 +197,7 @@ namespace juce::build_tools }; //============================================================================== - struct ProjectType_GUIApp : public ProjectType + struct ProjectType_GUIApp final : public ProjectType { ProjectType_GUIApp() : ProjectType (getTypeName(), "GUI Application") {} @@ -206,7 +206,7 @@ namespace juce::build_tools bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::GUIApp); } }; - struct ProjectType_ConsoleApp : public ProjectType + struct ProjectType_ConsoleApp final : public ProjectType { ProjectType_ConsoleApp() : ProjectType (getTypeName(), "Console Application") {} @@ -215,7 +215,7 @@ namespace juce::build_tools bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::ConsoleApp); } }; - struct ProjectType_StaticLibrary : public ProjectType + struct ProjectType_StaticLibrary final : public ProjectType { ProjectType_StaticLibrary() : ProjectType (getTypeName(), "Static Library") {} @@ -233,7 +233,7 @@ namespace juce::build_tools bool supportsTargetType (Target::Type targetType) const override { return (targetType == Target::DynamicLibrary); } }; - struct ProjectType_AudioPlugin : public ProjectType + struct ProjectType_AudioPlugin final : public ProjectType { ProjectType_AudioPlugin() : ProjectType (getTypeName(), "Audio Plug-in") {} @@ -270,7 +270,7 @@ namespace juce::build_tools } }; - struct ProjectType_ARAAudioPlugin : public ProjectType + struct ProjectType_ARAAudioPlugin final : public ProjectType { ProjectType_ARAAudioPlugin() : ProjectType (getTypeName(), "ARA Audio Plug-in") {} diff --git a/extras/NetworkGraphicsDemo/Source/ClientComponent.h b/extras/NetworkGraphicsDemo/Source/ClientComponent.h index ff1b53dbfa..f0e11bf9b9 100644 --- a/extras/NetworkGraphicsDemo/Source/ClientComponent.h +++ b/extras/NetworkGraphicsDemo/Source/ClientComponent.h @@ -96,7 +96,7 @@ private: canvasStateOSCMessageReceived (message); } - struct NewStateMessage : public Message + struct NewStateMessage final : public Message { NewStateMessage (const MemoryBlock& d) : data (d) {} MemoryBlock data; diff --git a/extras/NetworkGraphicsDemo/Source/Demos.h b/extras/NetworkGraphicsDemo/Source/Demos.h index 839d29961f..c996a36494 100644 --- a/extras/NetworkGraphicsDemo/Source/Demos.h +++ b/extras/NetworkGraphicsDemo/Source/Demos.h @@ -64,7 +64,7 @@ struct GridLines final : public AnimatedContent }; //============================================================================== -struct BackgroundLogo : public AnimatedContent +struct BackgroundLogo final : public AnimatedContent { BackgroundLogo() { diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index eba0f5ced5..6f1dbd2bb1 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -199,7 +199,7 @@ void ProjucerApplication::shutdown() deleteLogger(); } -struct AsyncQuitRetrier : private Timer +struct AsyncQuitRetrier final : private Timer { AsyncQuitRetrier() { startTimer (500); } diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index c317fedd07..dc16f35dab 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -167,7 +167,7 @@ private: //============================================================================== #if JUCE_MAC - class AppleMenuRebuildListener : private MenuBarModel::Listener + class AppleMenuRebuildListener final : private MenuBarModel::Listener { public: AppleMenuRebuildListener() diff --git a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp index 4369c3dc3c..8e78016494 100644 --- a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp +++ b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp @@ -148,7 +148,7 @@ void ThreadedAnalyticsDestination::EventDispatcher::addToQueue (const AnalyticsE namespace DestinationTestHelpers { //============================================================================== - struct BasicDestination : public ThreadedAnalyticsDestination + struct BasicDestination final : public ThreadedAnalyticsDestination { BasicDestination (std::deque& loggedEvents, std::deque& unloggedEvents) @@ -211,7 +211,7 @@ namespace DestinationTestHelpers } //============================================================================== -struct ThreadedAnalyticsDestinationTests : public UnitTest +struct ThreadedAnalyticsDestinationTests final : public UnitTest { ThreadedAnalyticsDestinationTests() : UnitTest ("ThreadedAnalyticsDestination", UnitTestCategories::analytics) diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index eb47b3f84e..2507ea98ca 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -750,7 +750,7 @@ int AudioChannelSet::getAmbisonicOrderForNumChannels (int numChannels, int maxOr //============================================================================== #if JUCE_UNIT_TESTS -class AudioChannelSetUnitTest : public UnitTest +class AudioChannelSetUnitTest final : public UnitTest { public: AudioChannelSetUnitTest() diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index f5e9c668fc..89aba5a35d 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -454,7 +454,7 @@ void AudioDataConverters::deinterleaveSamples (const float* source, float** dest //============================================================================== #if JUCE_UNIT_TESTS -class AudioConversionTests : public UnitTest +class AudioConversionTests final : public UnitTest { public: AudioConversionTests() diff --git a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index 1079e872a9..6ead8545fc 100644 --- a/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -1555,7 +1555,7 @@ ScopedNoDenormals::~ScopedNoDenormals() noexcept //============================================================================== #if JUCE_UNIT_TESTS -class FloatVectorOperationsTests : public UnitTest +class FloatVectorOperationsTests final : public UnitTest { public: FloatVectorOperationsTests() diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp index f3bdd2cd9f..7ae0068aa4 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp @@ -252,7 +252,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE //============================================================================== #if JUCE_UNIT_TESTS -struct MidiBufferTest : public UnitTest +struct MidiBufferTest final : public UnitTest { MidiBufferTest() : UnitTest ("MidiBuffer", UnitTestCategories::midi) diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.h b/modules/juce_audio_basics/midi/juce_MidiBuffer.h index 6a2a5413f9..404ccf17c6 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.h +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.h @@ -33,7 +33,7 @@ namespace juce @tags{Audio} */ -struct MidiMessageMetadata final +struct MidiMessageMetadata { MidiMessageMetadata() noexcept = default; diff --git a/modules/juce_audio_basics/midi/juce_MidiFile.cpp b/modules/juce_audio_basics/midi/juce_MidiFile.cpp index 19eb5a7896..5d22035203 100644 --- a/modules/juce_audio_basics/midi/juce_MidiFile.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiFile.cpp @@ -530,7 +530,7 @@ bool MidiFile::writeTrack (OutputStream& mainOut, const MidiMessageSequence& ms) //============================================================================== #if JUCE_UNIT_TESTS -struct MidiFileTest : public UnitTest +struct MidiFileTest final : public UnitTest { MidiFileTest() : UnitTest ("MidiFile", UnitTestCategories::midi) diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp index 4cb9f67e64..876760c532 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp @@ -1164,7 +1164,7 @@ const char* MidiMessage::getControllerName (const int n) //============================================================================== #if JUCE_UNIT_TESTS -struct MidiMessageTest : public UnitTest +struct MidiMessageTest final : public UnitTest { MidiMessageTest() : UnitTest ("MidiMessage", UnitTestCategories::midi) diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp index a3f6d61cf2..3eec184742 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp @@ -477,7 +477,7 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channel, double ti //============================================================================== #if JUCE_UNIT_TESTS -struct MidiMessageSequenceTest : public UnitTest +struct MidiMessageSequenceTest final : public UnitTest { MidiMessageSequenceTest() : UnitTest ("MidiMessageSequence", UnitTestCategories::midi) diff --git a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp index f16e73a76e..00c9536aa5 100644 --- a/modules/juce_audio_basics/midi/juce_MidiRPN.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiRPN.cpp @@ -158,7 +158,7 @@ MidiBuffer MidiRPNGenerator::generate (int midiChannel, //============================================================================== #if JUCE_UNIT_TESTS -class MidiRPNDetectorTests : public UnitTest +class MidiRPNDetectorTests final : public UnitTest { public: MidiRPNDetectorTests() @@ -364,7 +364,7 @@ public: static MidiRPNDetectorTests MidiRPNDetectorUnitTests; //============================================================================== -class MidiRPNGeneratorTests : public UnitTest +class MidiRPNGeneratorTests final : public UnitTest { public: MidiRPNGeneratorTests() diff --git a/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp b/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp index 355317e91e..732bf0e380 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp +++ b/modules/juce_audio_basics/midi/ump/juce_UMP_test.cpp @@ -28,7 +28,7 @@ constexpr uint16_t operator""_u16 (unsigned long long int i) { return static_cas constexpr uint32_t operator""_u32 (unsigned long long int i) { return static_cast (i); } constexpr uint64_t operator""_u64 (unsigned long long int i) { return static_cast (i); } -class UniversalMidiPacketTests : public UnitTest +class UniversalMidiPacketTests final : public UnitTest { public: UniversalMidiPacketTests() diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index 87f3df39f7..0622e27da4 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -866,7 +866,7 @@ void MPEInstrument::Listener::zoneLayoutChanged() //============================================================================== #if JUCE_UNIT_TESTS -class MPEInstrumentTests : public UnitTest +class MPEInstrumentTests final : public UnitTest { public: MPEInstrumentTests() @@ -2201,8 +2201,8 @@ private: /* This mock class is used for unit testing whether the methods of MPEInstrument are called correctly. */ - class UnitTestInstrument : public MPEInstrument, - private MPEInstrument::Listener + class UnitTestInstrument final : public MPEInstrument, + private MPEInstrument::Listener { using Base = MPEInstrument; diff --git a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp index c9109bfa73..463345deef 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp @@ -111,7 +111,7 @@ MidiBuffer MPEMessages::setZoneLayout (MPEZoneLayout layout) //============================================================================== #if JUCE_UNIT_TESTS -class MPEMessagesTests : public UnitTest +class MPEMessagesTests final : public UnitTest { public: MPEMessagesTests() diff --git a/modules/juce_audio_basics/mpe/juce_MPENote.cpp b/modules/juce_audio_basics/mpe/juce_MPENote.cpp index ed4414b7d5..0a82efe3c1 100644 --- a/modules/juce_audio_basics/mpe/juce_MPENote.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPENote.cpp @@ -89,7 +89,7 @@ bool MPENote::operator!= (const MPENote& other) const noexcept //============================================================================== #if JUCE_UNIT_TESTS -class MPENoteTests : public UnitTest +class MPENoteTests final : public UnitTest { public: MPENoteTests() diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp index 455555586e..048ef18399 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp @@ -164,7 +164,7 @@ void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples, boo namespace { - class MpeSynthesiserBaseTests : public UnitTest + class MpeSynthesiserBaseTests final : public UnitTest { enum class CallbackKind { process, midi }; @@ -190,7 +190,7 @@ namespace std::vector order; }; - class MockSynthesiser : public MPESynthesiserBase + class MockSynthesiser final : public MPESynthesiserBase { public: Events events; diff --git a/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp b/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp index bb3d48c3c8..8d0c1f162f 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEUtils.cpp @@ -284,7 +284,7 @@ void MPEChannelRemapper::zeroArrays() //============================================================================== #if JUCE_UNIT_TESTS -struct MPEUtilsUnitTests : public UnitTest +struct MPEUtilsUnitTests final : public UnitTest { MPEUtilsUnitTests() : UnitTest ("MPE Utilities", UnitTestCategories::midi) diff --git a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp index 5efd7ac4f1..3ece4bb26e 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEValue.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEValue.cpp @@ -99,7 +99,7 @@ bool MPEValue::operator!= (const MPEValue& other) const noexcept //============================================================================== #if JUCE_UNIT_TESTS -class MPEValueTests : public UnitTest +class MPEValueTests final : public UnitTest { public: MPEValueTests() diff --git a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp index b86e179b19..7ce29b6011 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp @@ -213,7 +213,7 @@ void MPEZoneLayout::checkAndLimitZoneParameters (int minValue, int maxValue, //============================================================================== #if JUCE_UNIT_TESTS -class MPEZoneLayoutTests : public UnitTest +class MPEZoneLayoutTests final : public UnitTest { public: MPEZoneLayoutTests() diff --git a/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp index db30a341ed..c5351075b1 100644 --- a/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp @@ -108,7 +108,7 @@ void MemoryAudioSource::setLooping (bool shouldLoop) //============================================================================== #if JUCE_UNIT_TESTS -struct MemoryAudioSourceTests : public UnitTest +struct MemoryAudioSourceTests final : public UnitTest { MemoryAudioSourceTests() : UnitTest ("MemoryAudioSource", UnitTestCategories::audio) {} diff --git a/modules/juce_audio_basics/utilities/juce_ADSR_test.cpp b/modules/juce_audio_basics/utilities/juce_ADSR_test.cpp index 94189b9ef9..e26dd6cefa 100644 --- a/modules/juce_audio_basics/utilities/juce_ADSR_test.cpp +++ b/modules/juce_audio_basics/utilities/juce_ADSR_test.cpp @@ -23,7 +23,7 @@ namespace juce { -struct ADSRTests : public UnitTest +struct ADSRTests final : public UnitTest { ADSRTests() : UnitTest ("ADSR", UnitTestCategories::audio) {} diff --git a/modules/juce_audio_basics/utilities/juce_Interpolators.cpp b/modules/juce_audio_basics/utilities/juce_Interpolators.cpp index 9ddaf18bc3..3e16a8e1ea 100644 --- a/modules/juce_audio_basics/utilities/juce_Interpolators.cpp +++ b/modules/juce_audio_basics/utilities/juce_Interpolators.cpp @@ -25,7 +25,7 @@ namespace juce #if JUCE_UNIT_TESTS -class InterpolatorTests : public UnitTest +class InterpolatorTests final : public UnitTest { public: InterpolatorTests() diff --git a/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp b/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp index e65e06cc93..9dbda5c548 100644 --- a/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp +++ b/modules/juce_audio_basics/utilities/juce_SmoothedValue.cpp @@ -28,7 +28,7 @@ namespace juce static CommonSmoothedValueTests > commonLinearSmoothedValueTests; static CommonSmoothedValueTests > commonMultiplicativeSmoothedValueTests; -class SmoothedValueTests : public UnitTest +class SmoothedValueTests final : public UnitTest { public: SmoothedValueTests() diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index cf6e5d5d70..447a240a25 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -61,9 +61,9 @@ bool AudioDeviceManager::AudioDeviceSetup::operator!= (const AudioDeviceManager: } //============================================================================== -class AudioDeviceManager::CallbackHandler : public AudioIODeviceCallback, - public MidiInputCallback, - public AudioIODeviceType::Listener +class AudioDeviceManager::CallbackHandler final : public AudioIODeviceCallback, + public MidiInputCallback, + public AudioIODeviceType::Listener { public: CallbackHandler (AudioDeviceManager& adm) noexcept : owner (adm) {} @@ -1379,7 +1379,7 @@ void AudioDeviceManager::setDefaultMidiOutput (const String& name) //============================================================================== #if JUCE_UNIT_TESTS -class AudioDeviceManagerTests : public UnitTest +class AudioDeviceManagerTests final : public UnitTest { public: AudioDeviceManagerTests() : UnitTest ("AudioDeviceManager", UnitTestCategories::audio) {} @@ -1757,8 +1757,8 @@ private: virtual void restart (double newSr, int newBs) = 0; }; - class MockDevice : public AudioIODevice, - private Restartable + class MockDevice final : public AudioIODevice, + private Restartable { public: MockDevice (ListenerList& l, String typeNameIn, String outNameIn, String inNameIn) @@ -1836,7 +1836,7 @@ private: bool on = false, playing = false; }; - class MockDeviceType : public AudioIODeviceType + class MockDeviceType final : public AudioIODeviceType { public: explicit MockDeviceType (String kind) @@ -1891,7 +1891,7 @@ private: ListenerList listeners; }; - class MockCallback : public AudioIODeviceCallback + class MockCallback final : public AudioIODeviceCallback { public: std::function callback; diff --git a/modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp b/modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp index e96a9d63c0..7195451601 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp +++ b/modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp @@ -23,7 +23,7 @@ namespace juce { -class MidiDeviceListConnectionBroadcaster : private AsyncUpdater +class MidiDeviceListConnectionBroadcaster final : private AsyncUpdater { public: ~MidiDeviceListConnectionBroadcaster() override diff --git a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp index 946f150e70..a17df4836f 100644 --- a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp +++ b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp @@ -481,7 +481,7 @@ private: }; //============================================================================== -class ALSAThread : public Thread +class ALSAThread final : public Thread { public: ALSAThread (const String& inputDeviceID, const String& outputDeviceID) @@ -838,7 +838,7 @@ private: //============================================================================== -class ALSAAudioIODevice : public AudioIODevice +class ALSAAudioIODevice final : public AudioIODevice { public: ALSAAudioIODevice (const String& deviceName, @@ -967,7 +967,7 @@ private: //============================================================================== -class ALSAAudioIODeviceType : public AudioIODeviceType +class ALSAAudioIODeviceType final : public AudioIODeviceType { public: ALSAAudioIODeviceType (bool onlySoundcards, const String& deviceTypeName) diff --git a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp index ec660d409a..ab6a2b635c 100644 --- a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp +++ b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp @@ -308,8 +308,8 @@ class ASIOAudioIODeviceType; static void sendASIODeviceChangeToListeners (ASIOAudioIODeviceType*); //============================================================================== -class ASIOAudioIODevice : public AudioIODevice, - private Timer +class ASIOAudioIODevice final : public AudioIODevice, + private Timer { public: ASIOAudioIODevice (ASIOAudioIODeviceType* ownerType, const String& devName, @@ -1438,7 +1438,7 @@ struct ASIOAudioIODevice::ASIOCallbackFunctions }; //============================================================================== -class ASIOAudioIODeviceType : public AudioIODeviceType +class ASIOAudioIODeviceType final : public AudioIODeviceType { public: ASIOAudioIODeviceType() : AudioIODeviceType ("ASIO") {} diff --git a/modules/juce_audio_devices/native/juce_Audio_android.cpp b/modules/juce_audio_devices/native/juce_Audio_android.cpp index 0dee58fd91..75b68e0448 100644 --- a/modules/juce_audio_devices/native/juce_Audio_android.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_android.cpp @@ -65,8 +65,8 @@ enum const char* const javaAudioTypeName = "Android Audio"; //============================================================================== -class AndroidAudioIODevice : public AudioIODevice, - public Thread +class AndroidAudioIODevice final : public AudioIODevice, + public Thread { public: //============================================================================== @@ -429,10 +429,10 @@ private: }; //============================================================================== -class AndroidAudioIODeviceType : public AudioIODeviceType +class AndroidAudioIODeviceType final : public AudioIODeviceType { public: - AndroidAudioIODeviceType() : AudioIODeviceType (javaAudioTypeName) {} + AndroidAudioIODeviceType() : AudioIODeviceType (javaAudioTypeName) {} //============================================================================== void scanForDevices() {} diff --git a/modules/juce_audio_devices/native/juce_Audio_ios.cpp b/modules/juce_audio_devices/native/juce_Audio_ios.cpp index 12f9df8995..148d5a5aec 100644 --- a/modules/juce_audio_devices/native/juce_Audio_ios.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_ios.cpp @@ -217,8 +217,8 @@ static void logNSError (NSError* e) #define JUCE_NSERROR_CHECK(X) { NSError* error = nil; X; logNSError (error); } //============================================================================== -class iOSAudioIODeviceType : public AudioIODeviceType, - public AsyncUpdater +class iOSAudioIODeviceType final : public AudioIODeviceType, + public AsyncUpdater { public: iOSAudioIODeviceType(); @@ -246,7 +246,7 @@ private: }; //============================================================================== -struct iOSAudioIODevice::Pimpl : public AsyncUpdater +struct iOSAudioIODevice::Pimpl final : public AsyncUpdater { Pimpl (iOSAudioIODeviceType* ioDeviceType, iOSAudioIODevice& ioDevice) : deviceType (ioDeviceType), @@ -557,7 +557,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater } //============================================================================== - class PlayHead : public AudioPlayHead + class PlayHead final : public AudioPlayHead { public: explicit PlayHead (Pimpl& implIn) : impl (implIn) {} diff --git a/modules/juce_audio_devices/native/juce_Bela_linux.cpp b/modules/juce_audio_devices/native/juce_Bela_linux.cpp index bf1ff16f39..56f0825748 100644 --- a/modules/juce_audio_devices/native/juce_Bela_linux.cpp +++ b/modules/juce_audio_devices/native/juce_Bela_linux.cpp @@ -180,7 +180,7 @@ Array MidiInput::Pimpl::midiInputs; //============================================================================== -class BelaAudioIODevice : public AudioIODevice +class BelaAudioIODevice final : public AudioIODevice { public: BelaAudioIODevice() : AudioIODevice (BelaAudioIODevice::belaTypeName, @@ -504,7 +504,7 @@ private: const char* const BelaAudioIODevice::belaTypeName = "Bela Analog"; //============================================================================== -struct BelaAudioIODeviceType : public AudioIODeviceType +struct BelaAudioIODeviceType final : public AudioIODeviceType { BelaAudioIODeviceType() : AudioIODeviceType ("Bela") {} diff --git a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp index 56cd029303..87aec679e7 100644 --- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp +++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp @@ -39,7 +39,7 @@ constexpr auto juceAudioObjectPropertyElementMain = #endif //============================================================================== -class ManagedAudioBufferList : public AudioBufferList +class ManagedAudioBufferList final : public AudioBufferList { public: struct Deleter @@ -290,8 +290,8 @@ class CoreAudioIODeviceType; class CoreAudioIODevice; //============================================================================== -class CoreAudioInternal : private Timer, - private AsyncUpdater +class CoreAudioInternal final : private Timer, + private AsyncUpdater { private: // members with deduced return types need to be defined before they @@ -1204,8 +1204,8 @@ private: //============================================================================== -class CoreAudioIODevice : public AudioIODevice, - private Timer +class CoreAudioIODevice final : public AudioIODevice, + private Timer { public: CoreAudioIODevice (CoreAudioIODeviceType* dt, @@ -1435,9 +1435,9 @@ private: //============================================================================== -class AudioIODeviceCombiner : public AudioIODevice, - private AsyncRestarter, - private Timer +class AudioIODeviceCombiner final : public AudioIODevice, + private AsyncRestarter, + private Timer { public: AudioIODeviceCombiner (const String& deviceName, CoreAudioIODeviceType* deviceType, @@ -1970,7 +1970,7 @@ private: void handleAudioDeviceError (const String& errorMessage) { shutdown (errorMessage.isNotEmpty() ? errorMessage : String ("unknown")); } //============================================================================== - struct DeviceWrapper : public AudioIODeviceCallback + struct DeviceWrapper final : public AudioIODeviceCallback { DeviceWrapper (AudioIODeviceCombiner& cd, std::unique_ptr d, bool shouldBeInput) : owner (cd), @@ -2069,7 +2069,7 @@ private: /* If the current AudioIODeviceCombiner::callback is nullptr, it sets itself as the callback and forwards error related callbacks to the provided callback */ - class ScopedErrorForwarder : public AudioIODeviceCallback + class ScopedErrorForwarder final : public AudioIODeviceCallback { public: ScopedErrorForwarder (AudioIODeviceCombiner& ownerIn, AudioIODeviceCallback* cb) @@ -2127,8 +2127,8 @@ private: //============================================================================== -class CoreAudioIODeviceType : public AudioIODeviceType, - private AsyncUpdater +class CoreAudioIODeviceType final : public AudioIODeviceType, + private AsyncUpdater { public: CoreAudioIODeviceType() : AudioIODeviceType ("CoreAudio") diff --git a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm index 490026719e..7fae094a51 100644 --- a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm +++ b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm @@ -80,7 +80,7 @@ namespace CoreMidiHelpers #if JUCE_HAS_NEW_COREMIDI_API template <> - struct API_AVAILABLE (macos (11.0), ios (14.0)) Sender : public SenderBase + struct API_AVAILABLE (macos (11.0), ios (14.0)) Sender final : public SenderBase { void send (MIDIPortRef port, MIDIEndpointRef endpoint, const ump::BytestreamMidiView& m) override { @@ -167,7 +167,7 @@ namespace CoreMidiHelpers #if JUCE_HAS_OLD_COREMIDI_API template <> - struct Sender : public SenderBase + struct Sender final : public SenderBase { void send (MIDIPortRef port, MIDIEndpointRef endpoint, const ump::BytestreamMidiView& m) override { diff --git a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp index 99c4d0fb74..424fc193f8 100644 --- a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp +++ b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp @@ -739,8 +739,8 @@ private: }; //============================================================================== -class DSoundAudioIODevice : public AudioIODevice, - public Thread +class DSoundAudioIODevice final : public AudioIODevice, + public Thread { public: DSoundAudioIODevice (const String& deviceName, @@ -1214,7 +1214,7 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels, } //============================================================================== -class DSoundAudioIODeviceType : public AudioIODeviceType +class DSoundAudioIODeviceType final : public AudioIODeviceType { public: DSoundAudioIODeviceType() diff --git a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp index db89433572..739fc2ebd4 100644 --- a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp +++ b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp @@ -158,7 +158,7 @@ struct JackPortIterator }; //============================================================================== -class JackAudioIODevice : public AudioIODevice +class JackAudioIODevice final : public AudioIODevice { public: JackAudioIODevice (const String& inName, @@ -416,7 +416,7 @@ public: private: //============================================================================== - class MainThreadDispatcher : private AsyncUpdater + class MainThreadDispatcher final : private AsyncUpdater { public: explicit MainThreadDispatcher (JackAudioIODevice& device) : ref (device) {} @@ -579,7 +579,7 @@ private: //============================================================================== class JackAudioIODeviceType; -class JackAudioIODeviceType : public AudioIODeviceType +class JackAudioIODeviceType final : public AudioIODeviceType { public: JackAudioIODeviceType() diff --git a/modules/juce_audio_devices/native/juce_Midi_linux.cpp b/modules/juce_audio_devices/native/juce_Midi_linux.cpp index 97ba3b8fe7..c06726f708 100644 --- a/modules/juce_audio_devices/native/juce_Midi_linux.cpp +++ b/modules/juce_audio_devices/native/juce_Midi_linux.cpp @@ -334,7 +334,7 @@ private: // created on the main thread, but the MidiDeviceListConnectionBroadcaster's constructor // can't complete until the AlsaClient's destructor has run, which in turn requires the // SequencerThread to join. - class UpdateNotifier : private AsyncUpdater + class UpdateNotifier final : private AsyncUpdater { public: ~UpdateNotifier() override { cancelPendingUpdate(); } @@ -528,13 +528,13 @@ struct AlsaPortPtr explicit AlsaPortPtr (AlsaClient::Port* p) : ptr (p) {} - ~AlsaPortPtr() noexcept { AlsaClient::getInstance()->deletePort (ptr); } + virtual ~AlsaPortPtr() noexcept { AlsaClient::getInstance()->deletePort (ptr); } AlsaClient::Port* ptr = nullptr; }; //============================================================================== -class MidiInput::Pimpl : public AlsaPortPtr +class MidiInput::Pimpl final : public AlsaPortPtr { public: using AlsaPortPtr::AlsaPortPtr; @@ -633,7 +633,7 @@ void MidiInput::stop() } //============================================================================== -class MidiOutput::Pimpl : public AlsaPortPtr +class MidiOutput::Pimpl final : public AlsaPortPtr { public: using AlsaPortPtr::AlsaPortPtr; diff --git a/modules/juce_audio_devices/native/juce_Midi_windows.cpp b/modules/juce_audio_devices/native/juce_Midi_windows.cpp index da6656b110..cb4d563a3c 100644 --- a/modules/juce_audio_devices/native/juce_Midi_windows.cpp +++ b/modules/juce_audio_devices/native/juce_Midi_windows.cpp @@ -100,8 +100,8 @@ struct MidiServiceType }; //============================================================================== -struct Win32MidiService : public MidiServiceType, - private Timer +struct Win32MidiService final : public MidiServiceType, + private Timer { Win32MidiService() = default; @@ -131,7 +131,7 @@ private: struct Win32InputWrapper; //============================================================================== - struct MidiInCollector : public ReferenceCountedObject + struct MidiInCollector final : public ReferenceCountedObject { MidiInCollector (Win32MidiService& s, MidiDeviceInfo d) : deviceInfo (d), midiService (s) @@ -370,6 +370,8 @@ private: template struct Win32MidiDeviceQuery { + virtual ~Win32MidiDeviceQuery() = default; + static Array getAvailableDevices() { StringArray deviceNames, deviceIDs; @@ -419,8 +421,8 @@ private: } }; - struct Win32InputWrapper : public MidiInput::Pimpl, - public Win32MidiDeviceQuery + struct Win32InputWrapper final : public MidiInput::Pimpl, + public Win32MidiDeviceQuery { Win32InputWrapper (Win32MidiService& parentService, MidiInput& midiInput, const String& deviceIdentifier, MidiInputCallback& c) : input (midiInput), callback (c) @@ -517,7 +519,7 @@ private: }; //============================================================================== - struct MidiOutHandle : public ReferenceCountedObject + struct MidiOutHandle final : public ReferenceCountedObject { using Ptr = ReferenceCountedObjectPtr; @@ -543,8 +545,8 @@ private: }; //============================================================================== - struct Win32OutputWrapper : public MidiOutput::Pimpl, - public Win32MidiDeviceQuery + struct Win32OutputWrapper final : public MidiOutput::Pimpl, + public Win32MidiDeviceQuery { Win32OutputWrapper (Win32MidiService& p, const String& deviceIdentifier) : parent (p) @@ -745,7 +747,7 @@ using namespace ABI::Windows::Devices::Enumeration; using namespace ABI::Windows::Storage::Streams; //============================================================================== -struct WinRTMidiService : public MidiServiceType +struct WinRTMidiService final : public MidiServiceType { public: //============================================================================== @@ -1008,7 +1010,7 @@ private: private: //============================================================================== - struct DeviceEnumerationThread : public Thread + struct DeviceEnumerationThread final : public Thread { DeviceEnumerationThread (DeviceCallbackHandler& h, ComSmartPtr& w, @@ -1063,7 +1065,7 @@ private: }; //============================================================================== - struct BLEDeviceWatcher final : private DeviceCallbackHandler + struct BLEDeviceWatcher final : private DeviceCallbackHandler { struct DeviceInfo { @@ -1253,7 +1255,7 @@ private: //============================================================================== template - struct MidiIODeviceWatcher final : private DeviceCallbackHandler + struct MidiIODeviceWatcher final : private DeviceCallbackHandler { MidiIODeviceWatcher (ComSmartPtr& comFactory) : factory (comFactory) @@ -1503,7 +1505,7 @@ private: //============================================================================== template - class WinRTIOWrapper : private BLEDeviceWatcher::Listener + class WinRTIOWrapper final : private BLEDeviceWatcher::Listener { public: WinRTIOWrapper (BLEDeviceWatcher& bleWatcher, @@ -1586,8 +1588,8 @@ private: }; //============================================================================== - struct WinRTInputWrapper final : public MidiInput::Pimpl, - private WinRTIOWrapper + struct WinRTInputWrapper final : public MidiInput::Pimpl, + private WinRTIOWrapper { WinRTInputWrapper (WinRTMidiService& service, MidiInput& input, const String& deviceIdentifier, MidiInputCallback& cb) @@ -1749,8 +1751,8 @@ private: }; //============================================================================== - struct WinRTOutputWrapper final : public MidiOutput::Pimpl, - private WinRTIOWrapper + struct WinRTOutputWrapper final : public MidiOutput::Pimpl, + private WinRTIOWrapper { WinRTOutputWrapper (WinRTMidiService& service, const String& deviceIdentifier) : WinRTIOWrapper (*service.bleDeviceWatcher, *service.outputDeviceWatcher, deviceIdentifier) @@ -1834,7 +1836,7 @@ private: extern RTL_OSVERSIONINFOW getWindowsVersionInfo(); #endif -struct MidiService : public DeletedAtShutdown +struct MidiService final : public DeletedAtShutdown { MidiService() { diff --git a/modules/juce_audio_devices/native/juce_Oboe_android.cpp b/modules/juce_audio_devices/native/juce_Oboe_android.cpp index 7e3cef2c99..0f46c05b68 100644 --- a/modules/juce_audio_devices/native/juce_Oboe_android.cpp +++ b/modules/juce_audio_devices/native/juce_Oboe_android.cpp @@ -124,7 +124,7 @@ static String getOboeString (const Type& value) } //============================================================================== -class OboeAudioIODevice : public AudioIODevice +class OboeAudioIODevice final : public AudioIODevice { public: //============================================================================== @@ -370,7 +370,7 @@ private: // providing a callback is required on some devices to get a FAST track, so we pass an // empty one to the temp stream to get the best available buffer size - struct DummyCallback : public oboe::AudioStreamCallback + struct DummyCallback final : public oboe::AudioStreamCallback { oboe::DataCallbackResult onAudioReady (oboe::AudioStream*, void*, int32_t) override { return oboe::DataCallbackResult::Stop; } }; @@ -609,7 +609,7 @@ private: }; //============================================================================== - class OboeSessionBase : protected oboe::AudioStreamCallback + class OboeSessionBase : protected oboe::AudioStreamCallback { public: static OboeSessionBase* create (OboeAudioIODevice& owner, @@ -730,7 +730,7 @@ private: //============================================================================== template - class OboeSessionImpl : public OboeSessionBase + class OboeSessionImpl final : public OboeSessionBase { public: OboeSessionImpl (OboeAudioIODevice& ownerToUse, @@ -1038,7 +1038,7 @@ OboeAudioIODevice::OboeSessionBase* OboeAudioIODevice::OboeSessionBase::create ( } //============================================================================== -class OboeAudioIODeviceType : public AudioIODeviceType +class OboeAudioIODeviceType final : public AudioIODeviceType { public: OboeAudioIODeviceType() @@ -1302,7 +1302,7 @@ const char* const OboeAudioIODevice::oboeTypeName = "Android Oboe"; bool isOboeAvailable() { return OboeAudioIODeviceType::isOboeAvailable(); } //============================================================================== -class OboeRealtimeThread : private oboe::AudioStreamCallback +class OboeRealtimeThread final : private oboe::AudioStreamCallback { using OboeStream = OboeAudioIODevice::OboeStream; diff --git a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp index 019da065e9..24af50b3af 100644 --- a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp +++ b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp @@ -41,7 +41,7 @@ DECLARE_JNI_CLASS (AndroidAudioManager, "android/media/AudioManager") #endif //============================================================================== -struct PCMDataFormatEx : SLDataFormat_PCM +struct PCMDataFormatEx final : SLDataFormat_PCM { SLuint32 representation; }; @@ -106,7 +106,7 @@ public: private: //============================================================================== - struct ControlBlock : ReferenceCountedObject + struct ControlBlock final : ReferenceCountedObject { ControlBlock() = default; ControlBlock (SLObjectItf o) : ptr (o) {} @@ -118,7 +118,7 @@ private: }; template -class SlRef : public SlObjectRef +class SlRef final : public SlObjectRef { public: //============================================================================== @@ -312,7 +312,7 @@ OpenSLEngineHolder& getEngineHolder() class SLRealtimeThread; //============================================================================== -class OpenSLAudioIODevice : public AudioIODevice +class OpenSLAudioIODevice final : public AudioIODevice { public: //============================================================================== @@ -427,7 +427,7 @@ public: //============================================================================== template - struct OpenSLQueueRunnerPlayer : OpenSLQueueRunner, SLPlayItf_> + struct OpenSLQueueRunnerPlayer final : OpenSLQueueRunner, SLPlayItf_> { using Base = OpenSLQueueRunner, SLPlayItf_>; @@ -472,7 +472,7 @@ public: }; template - struct OpenSLQueueRunnerRecorder : public OpenSLQueueRunner, SLRecordItf_> + struct OpenSLQueueRunnerRecorder final : public OpenSLQueueRunner, SLRecordItf_> { using Base = OpenSLQueueRunner, SLRecordItf_>; @@ -631,7 +631,7 @@ public: }; template - class OpenSLSessionT : public OpenSLSession + class OpenSLSessionT final : public OpenSLSession { public: OpenSLSessionT (int numInputChannels, int numOutputChannels, @@ -1068,7 +1068,7 @@ OpenSLAudioIODevice::OpenSLSession* OpenSLAudioIODevice::OpenSLSession::create ( } //============================================================================== -class OpenSLAudioDeviceType : public AudioIODeviceType +class OpenSLAudioDeviceType final : public AudioIODeviceType { public: OpenSLAudioDeviceType() : AudioIODeviceType (OpenSLAudioIODevice::openSLTypeName) {} diff --git a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp index 1d14380a41..c925486945 100644 --- a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp +++ b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp @@ -560,7 +560,7 @@ public: private: //============================================================================== - struct SessionEventCallback : public ComBaseClassHelper + struct SessionEventCallback final : public ComBaseClassHelper { SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {} @@ -923,7 +923,7 @@ private: }; //============================================================================== -class WASAPIInputDevice : public WASAPIDeviceBase +class WASAPIInputDevice final : public WASAPIDeviceBase { public: WASAPIInputDevice (const ComSmartPtr& d, WASAPIDeviceMode mode) @@ -1071,7 +1071,7 @@ private: }; //============================================================================== -class WASAPIOutputDevice : public WASAPIDeviceBase +class WASAPIOutputDevice final : public WASAPIDeviceBase { public: WASAPIOutputDevice (const ComSmartPtr& d, WASAPIDeviceMode mode) @@ -1198,7 +1198,7 @@ private: }; //============================================================================== -class WASAPIAudioIODevice : public AudioIODevice, +class WASAPIAudioIODevice final : public AudioIODevice, public Thread, private AsyncUpdater { @@ -1716,7 +1716,7 @@ private: //============================================================================== -class WASAPIAudioIODeviceType : public AudioIODeviceType +class WASAPIAudioIODeviceType final : public AudioIODeviceType { public: explicit WASAPIAudioIODeviceType (WASAPIDeviceMode mode) @@ -1815,7 +1815,7 @@ private: ComSmartPtr enumerator; //============================================================================== - class ChangeNotificationClient : public ComBaseClassHelper + class ChangeNotificationClient final : public ComBaseClassHelper { public: explicit ChangeNotificationClient (WASAPIAudioIODeviceType* d) diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 6974d048a9..1c6e052a22 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -382,7 +382,7 @@ namespace AiffFileHelpers } //============================================================================== -class AiffAudioFormatReader : public AudioFormatReader +class AiffAudioFormatReader final : public AudioFormatReader { public: AiffAudioFormatReader (InputStream* in) @@ -640,7 +640,7 @@ private: }; //============================================================================== -class AiffAudioFormatWriter : public AudioFormatWriter +class AiffAudioFormatWriter final : public AudioFormatWriter { public: AiffAudioFormatWriter (OutputStream* out, double rate, @@ -818,7 +818,7 @@ private: }; //============================================================================== -class MemoryMappedAiffReader : public MemoryMappedAudioFormatReader +class MemoryMappedAiffReader final : public MemoryMappedAudioFormatReader { public: MemoryMappedAiffReader (const File& f, const AiffAudioFormatReader& reader) diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index aa02a5c91e..090f7ed742 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -384,7 +384,7 @@ struct CoreAudioFormatMetatdata }; //============================================================================== -class CoreAudioReader : public AudioFormatReader +class CoreAudioReader final : public AudioFormatReader { public: using StreamKind = CoreAudioFormat::StreamKind; @@ -664,7 +664,7 @@ AudioFormatWriter* CoreAudioFormat::createWriterFor (OutputStream*, #define DEFINE_CHANNEL_LAYOUT_DFL_ENTRY(x) CoreAudioChannelLayoutTag { x, #x, AudioChannelSet() } #define DEFINE_CHANNEL_LAYOUT_TAG_ENTRY(x, y) CoreAudioChannelLayoutTag { x, #x, y } -class CoreAudioLayoutsUnitTest : public UnitTest +class CoreAudioLayoutsUnitTest final : public UnitTest { public: CoreAudioLayoutsUnitTest() diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 3fed533790..c689bccc55 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -183,7 +183,7 @@ template auto emptyRange (Item item) { return Range::emptyRange (item); } //============================================================================== -class FlacReader : public AudioFormatReader +class FlacReader final : public AudioFormatReader { public: FlacReader (InputStream* in) : AudioFormatReader (in, flacFormatName) @@ -386,7 +386,7 @@ private: //============================================================================== -class FlacWriter : public AudioFormatWriter +class FlacWriter final : public AudioFormatWriter { public: FlacWriter (OutputStream* out, double rate, uint32 numChans, uint32 bits, int qualityOptionIndex) diff --git a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp index 00f31082db..de7a76c30d 100644 --- a/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_LAMEEncoderAudioFormat.cpp @@ -28,7 +28,7 @@ namespace juce #if JUCE_USE_LAME_AUDIO_FORMAT -class LAMEEncoderAudioFormat::Writer : public AudioFormatWriter +class LAMEEncoderAudioFormat::Writer final : public AudioFormatWriter { public: Writer (OutputStream* destStream, const String& formatName, diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp index d24df3dfae..9e7821733f 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp @@ -2954,7 +2954,7 @@ private: static const char* const mp3FormatName = "MP3 file"; //============================================================================== -class MP3Reader : public AudioFormatReader +class MP3Reader final : public AudioFormatReader { public: MP3Reader (InputStream* const in) diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index fb13398828..335777b132 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -109,7 +109,7 @@ const char* const OggVorbisAudioFormat::id3trackNumber = "id3trackNumber"; //============================================================================== -class OggReader : public AudioFormatReader +class OggReader final : public AudioFormatReader { public: OggReader (InputStream* inp) : AudioFormatReader (inp, oggFormatName) @@ -262,7 +262,7 @@ private: }; //============================================================================== -class OggWriter : public AudioFormatWriter +class OggWriter final : public AudioFormatWriter { public: OggWriter (OutputStream* out, double rate, diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 0105a2c3f5..ff42cc1303 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -1204,7 +1204,7 @@ namespace WavFileHelpers } //============================================================================== -class WavAudioFormatReader : public AudioFormatReader +class WavAudioFormatReader final : public AudioFormatReader { public: WavAudioFormatReader (InputStream* in) : AudioFormatReader (in, wavFormatName) @@ -1579,7 +1579,7 @@ private: }; //============================================================================== -class WavAudioFormatWriter : public AudioFormatWriter +class WavAudioFormatWriter final : public AudioFormatWriter { public: WavAudioFormatWriter (OutputStream* const out, const double rate, @@ -1843,7 +1843,7 @@ private: }; //============================================================================== -class MemoryMappedWavReader : public MemoryMappedAudioFormatReader +class MemoryMappedWavReader final : public MemoryMappedAudioFormatReader { public: MemoryMappedWavReader (const File& wavFile, const WavAudioFormatReader& reader) @@ -2113,7 +2113,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai //============================================================================== #if JUCE_UNIT_TESTS -struct WaveAudioFormatTests : public UnitTest +struct WaveAudioFormatTests final : public UnitTest { WaveAudioFormatTests() : UnitTest ("Wave audio format tests", UnitTestCategories::audio) diff --git a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp index cb7af04cc3..1f18d5e14d 100644 --- a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp @@ -29,7 +29,7 @@ namespace juce namespace WindowsMediaCodec { -class JuceIStream : public ComBaseClassHelper +class JuceIStream final : public ComBaseClassHelper { public: JuceIStream (InputStream& in) noexcept @@ -127,7 +127,7 @@ static const char* wmFormatName = "Windows Media"; static const char* const extensions[] = { ".mp3", ".wmv", ".asf", ".wm", ".wma", nullptr }; //============================================================================== -class WMAudioReader : public AudioFormatReader +class WMAudioReader final : public AudioFormatReader { public: WMAudioReader (InputStream* const input_) diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp index e709b0c2f6..9ca241e69f 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp @@ -211,7 +211,7 @@ bool AudioFormatWriter::flush() } //============================================================================== -class AudioFormatWriter::ThreadedWriter::Buffer : private TimeSliceClient +class AudioFormatWriter::ThreadedWriter::Buffer final : private TimeSliceClient { public: Buffer (TimeSliceThread& tst, AudioFormatWriter* w, int channels, int numSamples) diff --git a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.cpp b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.cpp index 76f5070227..1e4f031c9c 100644 --- a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.cpp +++ b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.cpp @@ -185,7 +185,7 @@ static bool isSilent (const AudioBuffer& b) return true; } -struct TestAudioFormatReader : public AudioFormatReader +struct TestAudioFormatReader : public AudioFormatReader { explicit TestAudioFormatReader (const AudioBuffer* b) : AudioFormatReader (nullptr, {}), @@ -238,7 +238,7 @@ static AudioBuffer generateTestBuffer (Random& random, int bufferSize) return buffer; } -class BufferingAudioReaderTests : public UnitTest +class BufferingAudioReaderTests final : public UnitTest { public: BufferingAudioReaderTests() : UnitTest ("BufferingAudioReader", UnitTestCategories::audio) {} @@ -250,7 +250,7 @@ public: beginTest ("Reading samples from a blocked reader should produce silence"); { - struct BlockingReader : public TestAudioFormatReader + struct BlockingReader final : public TestAudioFormatReader { explicit BlockingReader (const AudioBuffer* b) : TestAudioFormatReader (b) diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp index 37bc28af56..7b7a58e18b 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp @@ -547,8 +547,8 @@ namespace AAXClasses //============================================================================== class JuceAAX_Processor; - class JuceAAX_GUI : public AAX_CEffectGUI, - public ModifierKeyProvider + class JuceAAX_GUI final : public AAX_CEffectGUI, + public ModifierKeyProvider { public: JuceAAX_GUI() = default; @@ -668,7 +668,7 @@ namespace AAXClasses } //============================================================================== - struct ContentWrapperComponent : public Component + struct ContentWrapperComponent final : public Component { ContentWrapperComponent (JuceAAX_GUI& gui, AudioProcessor& plugin) : owner (gui) @@ -805,10 +805,10 @@ namespace AAXClasses static Array activeProcessors; //============================================================================== - class JuceAAX_Processor : public AAX_CEffectParameters, - public juce::AudioPlayHead, - public AudioProcessorListener, - private AsyncUpdater + class JuceAAX_Processor final : public AAX_CEffectParameters, + public juce::AudioPlayHead, + public AudioProcessorListener, + private AsyncUpdater { public: JuceAAX_Processor() diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm index f1f39ca92f..a9c88d3124 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm @@ -104,10 +104,10 @@ struct AudioProcessorHolder }; //============================================================================== -class JuceAU : public AudioProcessorHolder, - public ausdk::MusicDeviceBase, - public AudioProcessorListener, - public AudioProcessorParameter::Listener +class JuceAU final : public AudioProcessorHolder, + public ausdk::MusicDeviceBase, + public AudioProcessorListener, + public AudioProcessorParameter::Listener { public: JuceAU (AudioUnit component) @@ -1152,7 +1152,7 @@ public: return rate > 0 ? juceFilter->getLatencySamples() / rate : 0; } - class ScopedPlayHead : private AudioPlayHead + class ScopedPlayHead final : private AudioPlayHead { public: explicit ScopedPlayHead (JuceAU& juceAudioUnit) @@ -1594,7 +1594,7 @@ public: } //============================================================================== - class EditorCompHolder : public Component + class EditorCompHolder final : public Component { public: EditorCompHolder (AudioProcessorEditor* const editor) @@ -1740,7 +1740,7 @@ public: } //============================================================================== - struct JuceUIViewClass : public ObjCClass + struct JuceUIViewClass final : public ObjCClass { JuceUIViewClass() : ObjCClass ("JUCEAUView_") { @@ -1831,7 +1831,7 @@ public: }; //============================================================================== - struct JuceUICreationClass : public ObjCClass + struct JuceUICreationClass final : public ObjCClass { JuceUICreationClass() : ObjCClass ("JUCE_AUCocoaViewClass_") { diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm index b75c811956..0ec50977f5 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm @@ -68,7 +68,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wnullability-completeness") using namespace juce; -struct AudioProcessorHolder : public ReferenceCountedObject +struct AudioProcessorHolder final : public ReferenceCountedObject { AudioProcessorHolder() = default; explicit AudioProcessorHolder (std::unique_ptr p) : processor (std::move (p)) {} @@ -103,9 +103,9 @@ private: //============================================================================== //=========================== The actual AudioUnit ============================= //============================================================================== -class JuceAudioUnitv3 : public AudioProcessorListener, - public AudioPlayHead, - private AudioProcessorParameter::Listener +class JuceAudioUnitv3 final : public AudioProcessorListener, + public AudioPlayHead, + private AudioProcessorParameter::Listener { public: JuceAudioUnitv3 (const AudioProcessorHolder::Ptr& processor, @@ -741,7 +741,7 @@ public: AUAudioUnit* getAudioUnit() const { return au; } private: - struct Class : public ObjCClass + struct Class final : public ObjCClass { Class() : ObjCClass ("AUAudioUnit_") { @@ -789,7 +789,7 @@ private: { WaitableEvent deletionEvent; - struct AUDeleter : public CallbackMessage + struct AUDeleter final : public CallbackMessage { AUDeleter (id selfToDelete, WaitableEvent& event) : parentSelf (selfToDelete), parentDeletionEvent (event) diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp index 18963c60e4..b822c60c2c 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp @@ -114,7 +114,7 @@ static const LV2_Options_Option* findMatchingOption (const LV2_Options_Option* o return nullptr; } -class ParameterStorage : private AudioProcessorListener +class ParameterStorage final : private AudioProcessorListener { public: ParameterStorage (AudioProcessor& proc, LV2_URID_Map map) @@ -290,7 +290,7 @@ struct PortIndices }; //============================================================================== -class PlayHead : public AudioPlayHead +class PlayHead final : public AudioPlayHead { public: PlayHead (LV2_URID_Map mapFeatureIn, double sampleRateIn) @@ -488,7 +488,7 @@ private: JUCE_LEAK_DETECTOR (Ports) }; -class LV2PluginInstance : private AudioProcessorListener +class LV2PluginInstance final : private AudioProcessorListener { public: LV2PluginInstance (double sampleRate, @@ -1514,8 +1514,8 @@ static Optional findScaleFactor (const LV2_URID_Map* symap, const LV2_Opt return parser.parseNumericOption (scaleFactorOption); } -class LV2UIInstance : private Component, - private ComponentListener +class LV2UIInstance final : private Component, + private ComponentListener { public: LV2UIInstance (const char*, diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp index 5eb4dfb7b5..8863438f32 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp @@ -54,7 +54,7 @@ namespace juce { //============================================================================== -class StandaloneFilterApp : public JUCEApplication +class StandaloneFilterApp final : public JUCEApplication { public: StandaloneFilterApp() diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp index 4df1cef392..4e8217760c 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp @@ -46,8 +46,8 @@ typedef ComponentPeer* (*createUnityPeerFunctionType) (Component&); extern createUnityPeerFunctionType juce_createUnityPeerFn; //============================================================================== -class UnityPeer : public ComponentPeer, - public AsyncUpdater +class UnityPeer final : public ComponentPeer, + public AsyncUpdater { public: UnityPeer (Component& ed) @@ -141,7 +141,7 @@ public: private: //============================================================================== - struct UnityBitmapImage : public ImagePixelData + struct UnityBitmapImage final : public ImagePixelData { UnityBitmapImage (uint8* data, int w, int h) : ImagePixelData (Image::PixelFormat::ARGB, w, h), @@ -187,7 +187,7 @@ private: }; //============================================================================== - struct MouseWatcher : public Timer + struct MouseWatcher final : public Timer { MouseWatcher (ComponentPeer& o) : owner (o) {} diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp index e2c3e00df6..262f0a00c0 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp @@ -196,10 +196,10 @@ struct AbletonLiveHostSpecific /** This is an AudioEffectX object that holds and wraps our AudioProcessor... */ -class JuceVSTWrapper : public AudioProcessorListener, - public AudioPlayHead, - private Timer, - private AudioProcessorParameter::Listener +class JuceVSTWrapper final : public AudioProcessorListener, + public AudioPlayHead, + private Timer, + private AudioProcessorParameter::Listener { private: //============================================================================== @@ -933,7 +933,7 @@ public: //============================================================================== // A component to hold the AudioProcessorEditor, and cope with some housekeeping // chores when it changes or repaints. - struct EditorCompWrapper : public Component + struct EditorCompWrapper final : public Component #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE , public Timer #endif @@ -1272,7 +1272,7 @@ public: //============================================================================== private: - struct HostChangeUpdater : private AsyncUpdater + struct HostChangeUpdater final : private AsyncUpdater { explicit HostChangeUpdater (JuceVSTWrapper& o) : owner (o) {} ~HostChangeUpdater() override { cancelPendingUpdate(); } @@ -1370,7 +1370,7 @@ private: { MessageManager::getInstance()->setCurrentThreadAsMessageThread(); - struct MessageThreadCallback : public CallbackMessage + struct MessageThreadCallback final : public CallbackMessage { MessageThreadCallback (bool& tr) : triggered (tr) {} void messageCallback() override { triggered = true; } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp index 108d45dd00..62703763d9 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp @@ -401,7 +401,7 @@ static tresult extractResult (const QueryInterfaceResult& userInterface, } //============================================================================== -class JuceAudioProcessor : public Vst::IUnitInfo +class JuceAudioProcessor final : public Vst::IUnitInfo { public: explicit JuceAudioProcessor (AudioProcessor* source) noexcept @@ -410,8 +410,6 @@ public: setupParameters(); } - virtual ~JuceAudioProcessor() = default; - AudioProcessor* get() const noexcept { return audioProcessor.get(); } JUCE_DECLARE_VST3_COM_QUERY_METHODS @@ -724,15 +722,15 @@ static void setValueAndNotifyIfChanged (AudioProcessorParameter& param, float ne } //============================================================================== -class JuceVST3EditController : public Vst::EditController, - public Vst::IMidiMapping, - public Vst::IUnitInfo, - public Vst::ChannelContext::IInfoListener, - #if JucePlugin_Enable_ARA - public Presonus::IPlugInViewEmbedding, - #endif - public AudioProcessorListener, - private ComponentRestarter::Listener +class JuceVST3EditController final : public Vst::EditController, + public Vst::IMidiMapping, + public Vst::IUnitInfo, + public Vst::ChannelContext::IInfoListener, + #if JucePlugin_Enable_ARA + public Presonus::IPlugInViewEmbedding, + #endif + public AudioProcessorListener, + private ComponentRestarter::Listener { public: explicit JuceVST3EditController (Vst::IHostApplication* host) @@ -791,7 +789,7 @@ public: } //============================================================================== - struct Param : public Vst::Parameter + struct Param final : public Vst::Parameter { Param (JuceVST3EditController& editController, AudioProcessorParameter& p, Vst::ParamID vstParamID, Vst::UnitID vstUnitID, @@ -903,7 +901,7 @@ public: }; //============================================================================== - struct ProgramChangeParameter : public Vst::Parameter + struct ProgramChangeParameter final : public Vst::Parameter { ProgramChangeParameter (AudioProcessor& p, Vst::ParamID vstParamID) : owner (p) @@ -1440,7 +1438,7 @@ private: } //============================================================================== - struct OwnedParameterListener : public AudioProcessorParameter::Listener + struct OwnedParameterListener final : public AudioProcessorParameter::Listener { OwnedParameterListener (JuceVST3EditController& editController, AudioProcessorParameter& parameter, @@ -1617,7 +1615,7 @@ private: } } - class EditorContextMenu : public HostProvidedContextMenu + class EditorContextMenu final : public HostProvidedContextMenu { public: EditorContextMenu (AudioProcessorEditor& editorIn, @@ -1700,7 +1698,7 @@ private: VSTComSmartPtr contextMenu; }; - class EditorHostContext : public AudioProcessorEditorHostContext + class EditorHostContext final : public AudioProcessorEditorHostContext { public: EditorHostContext (JuceAudioProcessor& processorIn, @@ -1732,9 +1730,9 @@ private: }; //============================================================================== - class JuceVST3Editor : public Vst::EditorView, - public Steinberg::IPlugViewContentScaleSupport, - private Timer + class JuceVST3Editor final : public Vst::EditorView, + public Steinberg::IPlugViewContentScaleSupport, + private Timer { public: JuceVST3Editor (JuceVST3EditController& ec, JuceAudioProcessor& p) @@ -2069,10 +2067,10 @@ private: } //============================================================================== - struct ContentWrapperComponent : public Component - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - , public Timer - #endif + struct ContentWrapperComponent final : public Component + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + , public Timer + #endif { ContentWrapperComponent (JuceVST3Editor& editor) : owner (editor) { @@ -2309,7 +2307,7 @@ private: // On macOS Cubase 10 resizes the host window after calling onSize() resulting in the peer // bounds being a step behind the plug-in. Calling updateBounds() asynchronously seems to fix things... - struct Cubase10WindowResizeWorkaround : public AsyncUpdater + struct Cubase10WindowResizeWorkaround final : public AsyncUpdater { Cubase10WindowResizeWorkaround (JuceVST3Editor& o) : owner (o) {} @@ -2374,7 +2372,7 @@ private: //============================================================================== #if JucePlugin_Enable_ARA - class JuceARAFactory : public ARA::IMainFactory + class JuceARAFactory final : public ARA::IMainFactory { public: JuceARAFactory() = default; @@ -2418,16 +2416,16 @@ private: #endif //============================================================================== -class JuceVST3Component : public Vst::IComponent, - public Vst::IAudioProcessor, - public Vst::IUnitInfo, - public Vst::IConnectionPoint, - public Vst::IProcessContextRequirements, - #if JucePlugin_Enable_ARA - public ARA::IPlugInEntryPoint, - public ARA::IPlugInEntryPoint2, - #endif - public AudioPlayHead +class JuceVST3Component final : public Vst::IComponent, + public Vst::IAudioProcessor, + public Vst::IUnitInfo, + public Vst::IConnectionPoint, + public Vst::IProcessContextRequirements, + #if JucePlugin_Enable_ARA + public ARA::IPlugInEntryPoint, + public ARA::IPlugInEntryPoint2, + #endif + public AudioPlayHead { public: JuceVST3Component (Vst::IHostApplication* h) @@ -3953,7 +3951,7 @@ bool shutdownModule() #endif // See https://steinbergmedia.github.io/vst3_dev_portal/pages/FAQ/Compatibility+with+VST+2.x+or+VST+1.html -class JucePluginCompatibility : public IPluginCompatibility +class JucePluginCompatibility final : public IPluginCompatibility { public: virtual ~JucePluginCompatibility() = default; @@ -4023,7 +4021,7 @@ private: using CreateFunction = FUnknown* (*)(Vst::IHostApplication*); //============================================================================== -struct JucePluginFactory : public IPluginFactory3 +struct JucePluginFactory final : public IPluginFactory3 { JucePluginFactory() : factoryInfo (JucePlugin_Manufacturer, JucePlugin_ManufacturerWebsite, diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp index 75fce26a78..bf9c9cf76b 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormat.cpp @@ -68,7 +68,7 @@ std::unique_ptr AudioPluginFormat::createInstanceFromDescri return instance; } -struct AudioPluginFormat::AsyncCreateMessage : public Message +struct AudioPluginFormat::AsyncCreateMessage final : public Message { AsyncCreateMessage (const PluginDescription& d, double sr, int size, PluginCreationCallback call) : desc (d), sampleRate (sr), bufferSize (size), callbackToUse (std::move (call)) diff --git a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp index 3e5c029bf4..a141860115 100644 --- a/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp +++ b/modules/juce_audio_processors/format/juce_AudioPluginFormatManager.cpp @@ -159,7 +159,7 @@ void AudioPluginFormatManager::createPluginInstanceAsync (const PluginDescriptio if (auto* format = findFormatForDescription (description, error)) return format->createPluginInstanceAsync (description, initialSampleRate, initialBufferSize, std::move (callback)); - struct DeliverError : public CallbackMessage + struct DeliverError final : public CallbackMessage { DeliverError (AudioPluginFormat::PluginCreationCallback c, const String& e) : call (std::move (c)), error (e) diff --git a/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp b/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp index 0221fe6020..2d959d3adc 100644 --- a/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp +++ b/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp @@ -340,7 +340,7 @@ public: using Vst3Fn = decltype (vst3Fn); using AuFn = decltype (auFn); - struct Visitor : ExtensionsVisitor, Vst3Fn, AuFn + struct Visitor final : public ExtensionsVisitor, Vst3Fn, AuFn { explicit Visitor (Vst3Fn vst3Fn, AuFn auFn) : Vst3Fn (std::move (vst3Fn)), AuFn (std::move (auFn)) {} void visitVST3Client (const VST3Client& x) override { Vst3Fn::operator() (x); } @@ -458,7 +458,7 @@ void createARAFactoryAsync (AudioPluginInstance& instance, std::function callbackIn) : callback (std::move (callbackIn)) diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index bbe61e9a9d..b7bba1e5f0 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -332,8 +332,8 @@ namespace AudioUnitFormatHelpers using ViewComponentBaseClass = NSViewComponent; #endif - struct AutoResizingNSViewComponent : public ViewComponentBaseClass, - private AsyncUpdater + struct AutoResizingNSViewComponent final : public ViewComponentBaseClass, + private AsyncUpdater { void childBoundsChanged (Component*) override { triggerAsyncUpdate(); } void handleAsyncUpdate() override { resizeToFitView(); } @@ -838,7 +838,7 @@ public: if (audioUnit != nullptr) { - struct AUDeleter : public CallbackMessage + struct AUDeleter final : public CallbackMessage { AUDeleter (AudioUnitPluginInstance& inInstance, WaitableEvent& inEvent) : auInstance (inInstance), completionSignal (inEvent) @@ -1165,7 +1165,7 @@ public: void getExtensions (ExtensionsVisitor& visitor) const override { - struct Extensions : public ExtensionsVisitor::AudioUnitClient + struct Extensions final : public ExtensionsVisitor::AudioUnitClient { explicit Extensions (const AudioUnitPluginInstance* instanceIn) : instance (instanceIn) {} @@ -1177,7 +1177,7 @@ public: visitor.visitAudioUnitClient (Extensions { this }); #ifdef JUCE_PLUGINHOST_ARA - struct ARAExtensions : public ExtensionsVisitor::ARAClient + struct ARAExtensions final : public ExtensionsVisitor::ARAClient { explicit ARAExtensions (const AudioUnitPluginInstance* instanceIn) : instance (instanceIn) {} @@ -2581,7 +2581,7 @@ private: }; //============================================================================== -class AudioUnitPluginWindowCocoa : public AudioProcessorEditor +class AudioUnitPluginWindowCocoa final : public AudioProcessorEditor { public: AudioUnitPluginWindowCocoa (AudioUnitPluginInstance& p, bool createGenericViewIfNeeded) @@ -2747,7 +2747,7 @@ private: if (! MessageManager::getInstance()->isThisTheMessageThread()) { - struct AsyncViewControllerCallback : public CallbackMessage + struct AsyncViewControllerCallback final : public CallbackMessage { AudioUnitPluginWindowCocoa* owner; JUCE_IOS_MAC_VIEW* controllerView; diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp index d054689cd4..7da21ed1da 100644 --- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp @@ -42,7 +42,7 @@ static int insideLADSPACallback = 0; #endif //============================================================================== -class LADSPAModuleHandle : public ReferenceCountedObject +class LADSPAModuleHandle final : public ReferenceCountedObject { public: LADSPAModuleHandle (const File& f) diff --git a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp index 1680057304..d0710fddf5 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp @@ -1087,7 +1087,7 @@ private: returns garbage, so make sure to check that the plugin `hasExtensionData` before constructing one of these! */ -class SharedThreadedWorker : public WorkerResponseListener +class SharedThreadedWorker final : public WorkerResponseListener { public: ~SharedThreadedWorker() noexcept override @@ -1383,7 +1383,7 @@ struct MessageBufferInterface }; template -class Messages : public MessageBufferInterface
+class Messages final : public MessageBufferInterface
{ using Read = typename LockTraits::Read; using Write = typename LockTraits::Write; @@ -1438,7 +1438,7 @@ private: }; //============================================================================== -class LambdaTimer : private Timer +class LambdaTimer final : private Timer { public: explicit LambdaTimer (std::function c) : callback (c) {} @@ -1466,7 +1466,7 @@ struct UiMessageHeader MessageHeader header; }; -class ProcessorToUi : public MessageBufferInterface +class ProcessorToUi final : public MessageBufferInterface { public: ProcessorToUi() { timer.startTimerHz (60); } @@ -1988,8 +1988,8 @@ private: std::vector atomPorts; }; -class InstanceWithSupports : private FeaturesDataListener, - private HandleHolder +class InstanceWithSupports final : private FeaturesDataListener, + private HandleHolder { public: InstanceWithSupports (World& world, @@ -2423,7 +2423,7 @@ private: JUCE_LEAK_DETECTOR (ParameterValuesAndFlags) }; -class LV2Parameter : public AudioPluginInstance::HostedParameter +class LV2Parameter : public AudioPluginInstance::HostedParameter { public: LV2Parameter (const String& nameIn, @@ -2740,7 +2740,7 @@ struct TouchListener virtual void controlGrabbed (uint32_t port, bool grabbed) = 0; }; -class AsyncFn : public AsyncUpdater +class AsyncFn final : public AsyncUpdater { public: explicit AsyncFn (std::function callbackIn) @@ -2976,7 +2976,7 @@ static bool noneOf (Range&& range, Predicate&& pred) return std::none_of (begin (range), end (range), std::forward (pred)); } -class PeerChangedListener : private ComponentMovementWatcher +class PeerChangedListener final : private ComponentMovementWatcher { public: PeerChangedListener (Component& c, std::function peerChangedIn) @@ -2995,7 +2995,7 @@ private: std::function peerChanged; }; -struct ViewSizeListener : private ComponentMovementWatcher +struct ViewSizeListener final : private ComponentMovementWatcher { ViewSizeListener (Component& c, PhysicalResizeListener& l) : ComponentMovementWatcher (&c), listener (l) @@ -3025,8 +3025,8 @@ struct ViewSizeListener : private ComponentMovementWatcher PhysicalResizeListener& listener; }; -class ConfiguredEditorComponent : public Component, - private PhysicalResizeListener +class ConfiguredEditorComponent final : public Component, + private PhysicalResizeListener { public: ConfiguredEditorComponent (World& world, @@ -3182,7 +3182,7 @@ private: #if JUCE_LINUX || JUCE_BSD struct InnerHolder { - struct Inner : public XEmbedComponent + struct Inner final : public XEmbedComponent { Inner() : XEmbedComponent (true, true) { @@ -3194,8 +3194,8 @@ private: Inner inner; }; - struct ViewComponent : public InnerHolder, - public XEmbedComponent + struct ViewComponent final : public InnerHolder, + public XEmbedComponent { explicit ViewComponent (PhysicalResizeListener& l) : XEmbedComponent ((unsigned long) inner.getPeer()->getNativeHandle(), true, false), @@ -3221,7 +3221,7 @@ private: ViewSizeListener listener; }; #elif JUCE_MAC - struct ViewComponent : public NSViewComponentWithParent + struct ViewComponent final : public NSViewComponentWithParent { explicit ViewComponent (PhysicalResizeListener&) : NSViewComponentWithParent (WantsNudge::no) {} @@ -3231,7 +3231,7 @@ private: void prepareForDestruction() {} }; #elif JUCE_WINDOWS - struct ViewComponent : public HWNDComponent + struct ViewComponent final : public HWNDComponent { explicit ViewComponent (PhysicalResizeListener&) { @@ -3252,7 +3252,7 @@ private: void prepareForDestruction() {} private: - struct Inner : public Component + struct Inner final : public Component { Inner() { setOpaque (true); } void paint (Graphics& g) override { g.fillAll (Colours::black); } @@ -3261,7 +3261,7 @@ private: Inner inner; }; #else - struct ViewComponent : public Component + struct ViewComponent final : public Component { explicit ViewComponent (PhysicalResizeListener&) {} void* getWidget() { return nullptr; } @@ -3339,9 +3339,9 @@ struct InstanceProvider virtual InstanceWithSupports* getInstanceWithSupports() const = 0; }; -class Editor : public AudioProcessorEditor, - public UiEventListener, - private LogicalResizeListener +class Editor final : public AudioProcessorEditor, + public UiEventListener, + private LogicalResizeListener { public: Editor (World& worldIn, @@ -3785,7 +3785,7 @@ private: JUCE_LEAK_DETECTOR (IntermediateParameterTree) }; -struct BypassParameter : public LV2Parameter +struct BypassParameter final : public LV2Parameter { BypassParameter (const ParameterInfo& parameterInfo, ParameterValuesAndFlags& cacheIn) : LV2Parameter ("Bypass", parameterInfo, cacheIn) {} @@ -4350,10 +4350,10 @@ public: }; //============================================================================== -class LV2AudioPluginInstance : public AudioPluginInstance, - private TouchListener, - private EditorListener, - private InstanceProvider +class LV2AudioPluginInstance final : public AudioPluginInstance, + private TouchListener, + private EditorListener, + private InstanceProvider { public: LV2AudioPluginInstance (std::shared_ptr worldIn, diff --git a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat_test.cpp b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat_test.cpp index 3264b381d0..33f3106ec1 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat_test.cpp +++ b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat_test.cpp @@ -28,7 +28,7 @@ namespace juce { -class LV2PluginFormatTests : public UnitTest +class LV2PluginFormatTests final : public UnitTest { public: LV2PluginFormatTests() diff --git a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp index a65a0d59ec..4cf81f026d 100644 --- a/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp +++ b/modules/juce_audio_processors/format_types/juce_LegacyAudioParameter.cpp @@ -29,7 +29,7 @@ namespace juce JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996) -class LegacyAudioParameter : public HostedAudioProcessorParameter +class LegacyAudioParameter final : public HostedAudioProcessorParameter { public: LegacyAudioParameter (AudioProcessor& audioProcessorToUse, int audioParameterIndex) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 9ece8f97b2..f253ca0bc1 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -119,7 +119,7 @@ static std::vector getAllParamIDs (Vst::IEditController& controlle /* Allows parameter updates to be queued up without blocking, and automatically dispatches these updates on the main thread. */ -class EditControllerParameterDispatcher : private Timer +class EditControllerParameterDispatcher final : private Timer { public: ~EditControllerParameterDispatcher() override { stopTimer(); } @@ -402,13 +402,13 @@ static void toProcessContext (Vst::ProcessContext& context, //============================================================================== class VST3PluginInstance; -struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 - public Vst::IComponentHandler2, // From VST V3.1.0 (a very well named class, of course!) - public Vst::IComponentHandler3, // From VST V3.5.0 (also very well named!) - public Vst::IContextMenuTarget, - public Vst::IHostApplication, - public Vst::IUnitHandler, - private ComponentRestarter::Listener +struct VST3HostContext final : public Vst::IComponentHandler, // From VST V3.0.0 + public Vst::IComponentHandler2, // From VST V3.1.0 (a very well named class, of course!) + public Vst::IComponentHandler3, // From VST V3.5.0 (also very well named!) + public Vst::IContextMenuTarget, + public Vst::IHostApplication, + public Vst::IUnitHandler, + private ComponentRestarter::Listener { VST3HostContext() { @@ -460,7 +460,7 @@ struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 } //============================================================================== - struct ContextMenu : public Vst::IContextMenu + struct ContextMenu final : public Vst::IContextMenu { ContextMenu (VST3PluginInstance& pluginInstance) : owner (pluginInstance) {} virtual ~ContextMenu() {} @@ -762,7 +762,7 @@ private: }; //============================================================================== - class AttributeList : public Vst::IAttributeList + class AttributeList final : public Vst::IAttributeList { public: AttributeList() = default; @@ -850,7 +850,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AttributeList) }; - struct Message : public Vst::IMessage + struct Message final : public Vst::IMessage { Message() = default; virtual ~Message() = default; @@ -1159,7 +1159,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DLLHandle) }; -struct DLLHandleCache : public DeletedAtShutdown +struct DLLHandleCache final : public DeletedAtShutdown { DLLHandleCache() = default; ~DLLHandleCache() override { clearSingletonInstance(); } @@ -1315,7 +1315,7 @@ public: private: //============================================================================== - struct TimerCaller : private Timer + struct TimerCaller final : private Timer { TimerCaller (Linux::ITimerHandler* h, int interval) : handler (h) { startTimer (interval); } ~TimerCaller() override { stopTimer(); } @@ -1338,7 +1338,7 @@ private: #endif //============================================================================== -struct VST3ModuleHandle : public ReferenceCountedObject +struct VST3ModuleHandle final : public ReferenceCountedObject { explicit VST3ModuleHandle (const File& pluginFile, const PluginDescription& pluginDesc) : file (pluginFile) @@ -1785,7 +1785,7 @@ private: #if JUCE_WINDOWS using HandleFormat = HWND; - struct ViewComponent : public HWNDComponent + struct ViewComponent final : public HWNDComponent { ViewComponent() { @@ -1799,7 +1799,7 @@ private: void paint (Graphics& g) override { g.fillAll (Colours::black); } private: - struct Inner : public Component + struct Inner final : public Component { Inner() { setOpaque (true); } void paint (Graphics& g) override { g.fillAll (Colours::black); } @@ -2086,7 +2086,7 @@ struct VST3ComponentHolder This is more memory-efficient than storing large vectors of parameter changes that we'll just throw away. */ -class ParamValueQueue : public Vst::IParamValueQueue +class ParamValueQueue final : public Vst::IParamValueQueue { public: ParamValueQueue (Vst::ParamID idIn, Steinberg::int32 parameterIndexIn) @@ -2154,7 +2154,7 @@ private: - Lookup by paramID is also O(1) - addParameterData never allocates, as long you pass a paramID already passed to initialise */ -class ParameterChanges : public Vst::IParameterChanges +class ParameterChanges final : public Vst::IParameterChanges { static constexpr Steinberg::int32 notInVector = -1; @@ -2482,8 +2482,8 @@ public: void getExtensions (ExtensionsVisitor& visitor) const override { - struct Extensions : public ExtensionsVisitor::VST3Client, - public ExtensionsVisitor::ARAClient + struct Extensions final : public ExtensionsVisitor::VST3Client, + public ExtensionsVisitor::ARAClient { explicit Extensions (const VST3PluginInstance* instanceIn) : instance (instanceIn) {} @@ -2877,7 +2877,7 @@ public: } } - struct TrackPropertiesAttributeList : public Vst::IAttributeList + struct TrackPropertiesAttributeList final : public Vst::IAttributeList { TrackPropertiesAttributeList (const TrackProperties& properties) : props (properties) {} virtual ~TrackPropertiesAttributeList() {} diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat_test.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat_test.cpp index 27c10a2d58..223bfe23de 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat_test.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat_test.cpp @@ -29,7 +29,7 @@ namespace juce { -class VST3PluginFormatTests : public UnitTest +class VST3PluginFormatTests final : public UnitTest { public: VST3PluginFormatTests() diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 9a108c489b..d08e11f5da 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -282,7 +282,7 @@ public: Group* parent = nullptr; }; - struct Param : public Base + struct Param final : public Base { int paramID; juce::String expr, name, label; @@ -292,7 +292,7 @@ public: float defaultValue; }; - struct Group : public Base + struct Group final : public Base { juce::String name; juce::OwnedArray paramTree; @@ -582,7 +582,7 @@ private: }; //============================================================================== -struct ModuleHandle : public ReferenceCountedObject +struct ModuleHandle final : public ReferenceCountedObject { File file; MainCall moduleMain, customMain = {}; @@ -1257,7 +1257,7 @@ struct VSTPluginInstance final : public AudioPluginInstance, void getExtensions (ExtensionsVisitor& visitor) const override { - struct Extensions : public ExtensionsVisitor::VSTClient + struct Extensions final : public ExtensionsVisitor::VSTClient { explicit Extensions (const VSTPluginInstance* instanceIn) : instance (instanceIn) {} @@ -2761,11 +2761,11 @@ struct VSTPluginWindow; static Array activeVSTWindows; //============================================================================== -struct VSTPluginWindow : public AudioProcessorEditor, - #if ! JUCE_MAC - private ComponentMovementWatcher, - #endif - private Timer +struct VSTPluginWindow final : public AudioProcessorEditor, + #if ! JUCE_MAC + private ComponentMovementWatcher, + #endif + private Timer { public: VSTPluginWindow (VSTPluginInstance& plug) @@ -3384,7 +3384,7 @@ private: NativeScaleFactorNotifier scaleNotifier { this, ScaleNotifierCallback { *this } }; #if JUCE_WINDOWS - struct ViewComponent : public HWNDComponent + struct ViewComponent final : public HWNDComponent { ViewComponent() { @@ -3398,7 +3398,7 @@ private: void paint (Graphics& g) override { g.fillAll (Colours::black); } private: - struct Inner : public Component + struct Inner final : public Component { Inner() { setOpaque (true); } void paint (Graphics& g) override { g.fillAll (Colours::black); } diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp index 27ed7c3290..219c6efc47 100644 --- a/modules/juce_audio_processors/juce_audio_processors.cpp +++ b/modules/juce_audio_processors/juce_audio_processors.cpp @@ -108,8 +108,8 @@ void callOnMessageThread (Callback&& callback) request that the editor bounds are updated. We can call `setSize` on this component from inside those dedicated callbacks. */ -struct NSViewComponentWithParent : public NSViewComponent, - private AsyncUpdater +struct NSViewComponentWithParent : public NSViewComponent, + private AsyncUpdater { enum class WantsNudge { no, yes }; @@ -156,7 +156,7 @@ private: } } - struct InnerNSView : public ObjCClass + struct InnerNSView final : public ObjCClass { InnerNSView() : ObjCClass ("JuceInnerNSView_") diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 08391b31c0..6f80d24a80 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -569,7 +569,7 @@ struct GraphRenderSequence void addClearChannelOp (int index) { - struct ClearOp : public RenderOp + struct ClearOp final : public RenderOp { explicit ClearOp (int indexIn) : index (indexIn) {} @@ -592,7 +592,7 @@ struct GraphRenderSequence void addCopyChannelOp (int srcIndex, int dstIndex) { - struct CopyOp : public RenderOp + struct CopyOp final : public RenderOp { explicit CopyOp (int fromIn, int toIn) : from (fromIn), to (toIn) {} @@ -617,7 +617,7 @@ struct GraphRenderSequence void addAddChannelOp (int srcIndex, int dstIndex) { - struct AddOp : public RenderOp + struct AddOp final : public RenderOp { explicit AddOp (int fromIn, int toIn) : from (fromIn), to (toIn) {} @@ -644,7 +644,7 @@ struct GraphRenderSequence void addClearMidiBufferOp (int index) { - struct ClearOp : public RenderOp + struct ClearOp final : public RenderOp { explicit ClearOp (int indexIn) : index (indexIn) {} @@ -667,7 +667,7 @@ struct GraphRenderSequence void addCopyMidiBufferOp (int srcIndex, int dstIndex) { - struct CopyOp : public RenderOp + struct CopyOp final : public RenderOp { explicit CopyOp (int fromIn, int toIn) : from (fromIn), to (toIn) {} @@ -692,7 +692,7 @@ struct GraphRenderSequence void addAddMidiBufferOp (int srcIndex, int dstIndex) { - struct AddOp : public RenderOp + struct AddOp final : public RenderOp { explicit AddOp (int fromIn, int toIn) : from (fromIn), to (toIn) {} @@ -717,7 +717,7 @@ struct GraphRenderSequence void addDelayChannelOp (int chan, int delaySize) { - struct DelayChannelOp : public RenderOp + struct DelayChannelOp final : public RenderOp { DelayChannelOp (int chan, int delaySize) : buffer ((size_t) (delaySize + 1), (FloatType) 0), @@ -887,7 +887,7 @@ private: const int midiBufferToUse; }; - struct ProcessOp : public NodeOp + struct ProcessOp final : public NodeOp { using NodeOp::NodeOp; @@ -936,7 +936,7 @@ private: AudioBuffer tempBufferFloat, tempBufferDouble; }; - struct MidiInOp : public NodeOp + struct MidiInOp final : public NodeOp { using NodeOp::NodeOp; @@ -947,7 +947,7 @@ private: } }; - struct MidiOutOp : public NodeOp + struct MidiOutOp final : public NodeOp { using NodeOp::NodeOp; @@ -958,7 +958,7 @@ private: } }; - struct AudioInOp : public NodeOp + struct AudioInOp final : public NodeOp { using NodeOp::NodeOp; @@ -972,7 +972,7 @@ private: } }; - struct AudioOutOp : public NodeOp + struct AudioOutOp final : public NodeOp { using NodeOp::NodeOp; @@ -1591,7 +1591,7 @@ private: At the top of the audio callback, RenderSequenceExchange::updateAudioThreadState will attempt to install the most-recently-baked graph, if there's one waiting. */ -class RenderSequenceExchange : private Timer +class RenderSequenceExchange final : private Timer { public: RenderSequenceExchange() @@ -2103,7 +2103,7 @@ void AudioProcessorGraph::AudioGraphIOProcessor::setParentGraph (AudioProcessorG //============================================================================== #if JUCE_UNIT_TESTS -class AudioProcessorGraphTests : public UnitTest +class AudioProcessorGraphTests final : public UnitTest { public: AudioProcessorGraphTests() @@ -2239,7 +2239,7 @@ private: enum class MidiIn { no, yes }; enum class MidiOut { no, yes }; - class BasicProcessor : public AudioProcessor + class BasicProcessor final : public AudioProcessor { public: explicit BasicProcessor (const AudioProcessor::BusesProperties& layout, MidiIn mIn, MidiOut mOut) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.cpp index f66854c2c2..75e713d7ed 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorParameterGroup.cpp @@ -184,7 +184,7 @@ const AudioProcessorParameterGroup* AudioProcessorParameterGroup::getGroupForPar //============================================================================== #if JUCE_UNIT_TESTS -class ParameterGroupTests : public UnitTest +class ParameterGroupTests final : public UnitTest { public: ParameterGroupTests() @@ -292,7 +292,7 @@ public: } private: - struct TestAudioProcessor : public AudioProcessor + struct TestAudioProcessor final : public AudioProcessor { const String getName() const override { return "ap"; } void prepareToPlay (double, int) override {} diff --git a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp index 7e32b8b776..425152fb7e 100644 --- a/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_GenericAudioProcessorEditor.cpp @@ -26,9 +26,9 @@ namespace juce { -class ParameterListener : private AudioProcessorParameter::Listener, - private AudioProcessorListener, - private Timer +class ParameterListener : private AudioProcessorParameter::Listener, + private AudioProcessorListener, + private Timer { public: ParameterListener (AudioProcessor& proc, AudioProcessorParameter& param) @@ -107,7 +107,7 @@ public: }; //============================================================================== -class BooleanParameterComponent : public ParameterComponent +class BooleanParameterComponent final : public ParameterComponent { public: BooleanParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) @@ -154,7 +154,7 @@ private: }; //============================================================================== -class SwitchParameterComponent : public ParameterComponent +class SwitchParameterComponent final : public ParameterComponent { public: SwitchParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) @@ -256,7 +256,7 @@ private: }; //============================================================================== -class ChoiceParameterComponent : public ParameterComponent +class ChoiceParameterComponent final : public ParameterComponent { public: ChoiceParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) @@ -318,7 +318,7 @@ private: }; //============================================================================== -class SliderParameterComponent : public ParameterComponent +class SliderParameterComponent final : public ParameterComponent { public: SliderParameterComponent (AudioProcessor& proc, AudioProcessorParameter& param) @@ -411,9 +411,9 @@ private: }; //============================================================================== -class ParameterDisplayComponent : public Component, - private AudioProcessorListener, - private AsyncUpdater +class ParameterDisplayComponent final : public Component, + private AudioProcessorListener, + private AsyncUpdater { public: ParameterDisplayComponent (AudioProcessorEditor& editorIn, AudioProcessorParameter& param) @@ -515,7 +515,7 @@ private: }; //============================================================================== -struct ParamControlItem : public TreeViewItem +struct ParamControlItem final : public TreeViewItem { ParamControlItem (AudioProcessorEditor& editorIn, AudioProcessorParameter& paramIn) : editor (editorIn), param (paramIn) {} @@ -533,7 +533,7 @@ struct ParamControlItem : public TreeViewItem AudioProcessorParameter& param; }; -struct ParameterGroupItem : public TreeViewItem +struct ParameterGroupItem final : public TreeViewItem { ParameterGroupItem (AudioProcessorEditor& editor, const AudioProcessorParameterGroup& group) : name (group.getName()) diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp index af4e0013fc..2aaaaeb7a1 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp @@ -381,7 +381,7 @@ void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPl } //============================================================================== -class PluginListComponent::Scanner : private Timer +class PluginListComponent::Scanner final : private Timer { public: Scanner (PluginListComponent& plc, AudioPluginFormat& format, const StringArray& filesOrIdentifiers, @@ -609,7 +609,7 @@ private: return false; } - struct ScanJob : public ThreadPoolJob + struct ScanJob final : public ThreadPoolJob { ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {} diff --git a/modules/juce_audio_processors/utilities/ARA/juce_ARADocumentControllerCommon.cpp b/modules/juce_audio_processors/utilities/ARA/juce_ARADocumentControllerCommon.cpp index 2b2364ce94..028dbd12a3 100644 --- a/modules/juce_audio_processors/utilities/ARA/juce_ARADocumentControllerCommon.cpp +++ b/modules/juce_audio_processors/utilities/ARA/juce_ARADocumentControllerCommon.cpp @@ -26,7 +26,7 @@ namespace juce { -class ARADocumentController : public ARA::PlugIn::DocumentController +class ARADocumentController : public ARA::PlugIn::DocumentController { public: using ARA::PlugIn::DocumentController::DocumentController; diff --git a/modules/juce_audio_processors/utilities/juce_AAXClientExtensions.cpp b/modules/juce_audio_processors/utilities/juce_AAXClientExtensions.cpp index 9596d00619..4268d01860 100644 --- a/modules/juce_audio_processors/utilities/juce_AAXClientExtensions.cpp +++ b/modules/juce_audio_processors/utilities/juce_AAXClientExtensions.cpp @@ -255,7 +255,7 @@ static int32 getPluginIDForMainBusConfigJuce705 (const AudioChannelSet& mainInpu return (idForAudioSuite ? 0x6a796161 /* 'jyaa' */ : 0x6a636161 /* 'jcaa' */) + uniqueFormatId; } -class AAXClientExtensionsTests : public UnitTest +class AAXClientExtensionsTests final : public UnitTest { public: AAXClientExtensionsTests() diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp index 3e0875939f..88fa68adc2 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterChoice.cpp @@ -84,7 +84,7 @@ AudioParameterChoice& AudioParameterChoice::operator= (int newValue) //============================================================================== #if JUCE_UNIT_TESTS -struct AudioParameterChoiceTests : public UnitTest +struct AudioParameterChoiceTests final : public UnitTest { AudioParameterChoiceTests() : UnitTest ("AudioParameterChoice", UnitTestCategories::audioProcessorParameters) diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp index 356ca03638..b1df4d1a7b 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterInt.cpp @@ -80,7 +80,7 @@ AudioParameterInt& AudioParameterInt::operator= (int newValue) //============================================================================== #if JUCE_UNIT_TESTS -struct AudioParameterIntTests : public UnitTest +struct AudioParameterIntTests final : public UnitTest { AudioParameterIntTests() : UnitTest ("AudioParameterInt", UnitTestCategories::audioProcessorParameters) diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp index fa9f91ab99..05bd71adb4 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp @@ -60,7 +60,7 @@ void AudioProcessorValueTreeState::Parameter::valueChanged (float newValue) } //============================================================================== -class AudioProcessorValueTreeState::ParameterAdapter : private AudioProcessorParameter::Listener +class AudioProcessorValueTreeState::ParameterAdapter final : private AudioProcessorParameter::Listener { private: using Listener = AudioProcessorValueTreeState::Listener; @@ -208,7 +208,7 @@ AudioProcessorValueTreeState::AudioProcessorValueTreeState (AudioProcessor& proc ParameterLayout parameterLayout) : AudioProcessorValueTreeState (processorToConnectTo, undoManagerToUse) { - struct PushBackVisitor : ParameterLayout::Visitor + struct PushBackVisitor final : ParameterLayout::Visitor { explicit PushBackVisitor (AudioProcessorValueTreeState& stateIn) : state (&stateIn) {} @@ -506,7 +506,7 @@ AudioProcessorValueTreeState::ButtonAttachment::ButtonAttachment (AudioProcessor //============================================================================== #if JUCE_UNIT_TESTS -struct ParameterAdapterTests : public UnitTest +struct ParameterAdapterTests final : public UnitTest { ParameterAdapterTests() : UnitTest ("Parameter Adapter", UnitTestCategories::audioProcessorParameters) @@ -600,7 +600,7 @@ inline bool operator!= (const NormalisableRange& a, } } // namespace -class AudioProcessorValueTreeStateTests : public UnitTest +class AudioProcessorValueTreeStateTests final : public UnitTest { private: using Parameter = AudioProcessorValueTreeState::Parameter; @@ -608,7 +608,7 @@ private: using ParameterLayout = AudioProcessorValueTreeState::ParameterLayout; using Attributes = AudioProcessorValueTreeStateParameterAttributes; - class TestAudioProcessor : public AudioProcessor + class TestAudioProcessor final : public AudioProcessor { public: TestAudioProcessor() = default; diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index 4f499d8d97..ae27633d7b 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -26,8 +26,8 @@ namespace juce { -struct SimpleDeviceManagerInputLevelMeter : public Component, - public Timer +struct SimpleDeviceManagerInputLevelMeter final : public Component, + public Timer { SimpleDeviceManagerInputLevelMeter (AudioDeviceManager& m) : manager (m) { @@ -86,8 +86,8 @@ static void drawTextLayout (Graphics& g, Component& owner, StringRef text, const //============================================================================== -class AudioDeviceSelectorComponent::MidiInputSelectorComponentListBox : public ListBox, - private ListBoxModel +class AudioDeviceSelectorComponent::MidiInputSelectorComponentListBox final : public ListBox, + private ListBoxModel { public: MidiInputSelectorComponentListBox (AudioDeviceManager& dm, const String& noItems) @@ -731,8 +731,8 @@ private: public: //============================================================================== - class ChannelSelectorListBox : public ListBox, - private ListBoxModel + class ChannelSelectorListBox final : public ListBox, + private ListBoxModel { public: enum BoxType diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp index dac466610d..f1330a35bd 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp @@ -86,7 +86,7 @@ private: //============================================================================== template -class AudioBufferReader : public AudioFormatReader +class AudioBufferReader final : public AudioFormatReader { public: AudioBufferReader (const AudioBuffer* bufferIn, double rate) @@ -144,7 +144,7 @@ private: }; //============================================================================== -class AudioThumbnail::LevelDataSource : public TimeSliceClient +class AudioThumbnail::LevelDataSource final : public TimeSliceClient { public: LevelDataSource (AudioThumbnail& thumb, AudioFormatReader* newReader, int64 hash) diff --git a/modules/juce_audio_utils/gui/juce_KeyboardComponentBase.cpp b/modules/juce_audio_utils/gui/juce_KeyboardComponentBase.cpp index 048a53b41c..bc02089b57 100644 --- a/modules/juce_audio_utils/gui/juce_KeyboardComponentBase.cpp +++ b/modules/juce_audio_utils/gui/juce_KeyboardComponentBase.cpp @@ -30,7 +30,7 @@ constexpr uint8 whiteNotes[] = { 0, 2, 4, 5, 7, 9, 11 }; constexpr uint8 blackNotes[] = { 1, 3, 6, 8, 10 }; //============================================================================== -struct KeyboardComponentBase::UpDownButton : public Button +struct KeyboardComponentBase::UpDownButton final : public Button { UpDownButton (KeyboardComponentBase& c, int d) : Button ({}), owner (c), delta (d) diff --git a/modules/juce_audio_utils/gui/juce_MPEKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MPEKeyboardComponent.cpp index 76e022f4c5..6a112d9189 100644 --- a/modules/juce_audio_utils/gui/juce_MPEKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MPEKeyboardComponent.cpp @@ -26,7 +26,7 @@ namespace juce { -struct MPEKeyboardComponent::MPENoteComponent : public Component +struct MPEKeyboardComponent::MPENoteComponent final : public Component { MPENoteComponent (MPEKeyboardComponent& o, uint16 sID, uint8 initial, float noteOnVel, float press) : owner (o), diff --git a/modules/juce_audio_utils/native/juce_AudioCDBurner_mac.mm b/modules/juce_audio_utils/native/juce_AudioCDBurner_mac.mm index 3642c5a122..39f2d77360 100644 --- a/modules/juce_audio_utils/native/juce_AudioCDBurner_mac.mm +++ b/modules/juce_audio_utils/native/juce_AudioCDBurner_mac.mm @@ -28,7 +28,7 @@ namespace juce const int kilobytesPerSecond1x = 176; -struct AudioTrackProducerClass : public ObjCClass +struct AudioTrackProducerClass final : public ObjCClass { AudioTrackProducerClass() : ObjCClass ("JUCEAudioTrackProducer_") { diff --git a/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp b/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp index 69fb26f50c..a98e1f9c0e 100644 --- a/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp +++ b/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp @@ -420,7 +420,7 @@ DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driv //============================================================================== // Controller types.. -class ControllerType1 : public CDController +class ControllerType1 final : public CDController { public: ControllerType1() {} @@ -454,7 +454,7 @@ public: }; //============================================================================== -class ControllerType2 : public CDController +class ControllerType2 final : public CDController { public: ControllerType2() {} @@ -557,7 +557,7 @@ public: }; //============================================================================== -class ControllerType3 : public CDController +class ControllerType3 final : public CDController { public: ControllerType3() {} @@ -596,7 +596,7 @@ public: }; //============================================================================== -class ControllerType4 : public CDController +class ControllerType4 final : public CDController { public: ControllerType4() {} diff --git a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_android.cpp b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_android.cpp index 6673568a3c..16988c5b41 100644 --- a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_android.cpp +++ b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_android.cpp @@ -186,9 +186,9 @@ struct AndroidBluetoothMidiDevice }; //============================================================================== -class AndroidBluetoothMidiDevicesListBox : public ListBox, - private ListBoxModel, - private Timer +class AndroidBluetoothMidiDevicesListBox final : public ListBox, + private ListBoxModel, + private Timer { public: //============================================================================== @@ -302,8 +302,8 @@ private: } //============================================================================== - struct PairDeviceThread : public Thread, - private AsyncUpdater + struct PairDeviceThread final : public Thread, + private AsyncUpdater { PairDeviceThread (const String& bluetoothAddressOfDeviceToPair, AndroidBluetoothMidiDevicesListBox& ownerListBox) @@ -394,7 +394,7 @@ private: }; //============================================================================== -class BluetoothMidiSelectorOverlay : public Component +class BluetoothMidiSelectorOverlay final : public Component { public: BluetoothMidiSelectorOverlay (ModalComponentManager::Callback* exitCallbackToUse, diff --git a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_ios.mm b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_ios.mm index 06b908c988..03d837ac67 100644 --- a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_ios.mm +++ b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_ios.mm @@ -29,7 +29,7 @@ namespace juce { //============================================================================== -class BluetoothMidiSelectorOverlay : public Component +class BluetoothMidiSelectorOverlay final : public Component { public: BluetoothMidiSelectorOverlay (ModalComponentManager::Callback* exitCallbackToUse, diff --git a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm index b489af90a3..2be0fdae92 100644 --- a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm +++ b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm @@ -27,7 +27,7 @@ namespace juce { //============================================================================== -class API_AVAILABLE (macos (10.11)) BluetoothMidiPairingWindowClass : public ObjCClass +class API_AVAILABLE (macos (10.11)) BluetoothMidiPairingWindowClass final : public ObjCClass { public: struct Callbacks @@ -117,7 +117,7 @@ private: } }; -class API_AVAILABLE (macos (10.11)) BluetoothMidiSelectorWindowHelper : public DeletedAtShutdown +class API_AVAILABLE (macos (10.11)) BluetoothMidiSelectorWindowHelper final : public DeletedAtShutdown { public: BluetoothMidiSelectorWindowHelper (ModalComponentManager::Callback* exitCallback, diff --git a/modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp b/modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp index 66026b1e13..4002b714a0 100644 --- a/modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp +++ b/modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp @@ -279,7 +279,7 @@ void AudioProcessorPlayer::audioDeviceIOCallbackWithContext (const float* const* if (std::exchange (currentWorkgroup, currentDevice->getWorkgroup()) != currentDevice->getWorkgroup()) processor->audioWorkgroupContextChanged (currentWorkgroup); - class PlayHead : private AudioPlayHead + class PlayHead final : private AudioPlayHead { public: PlayHead (AudioProcessor& proc, @@ -416,7 +416,7 @@ void AudioProcessorPlayer::handleIncomingMidiMessage (MidiInput*, const MidiMess //============================================================================== #if JUCE_UNIT_TESTS -struct AudioProcessorPlayerTests : public UnitTest +struct AudioProcessorPlayerTests final : public UnitTest { AudioProcessorPlayerTests() : UnitTest ("AudioProcessorPlayer", UnitTestCategories::audio) {} diff --git a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp index 90abda880f..b671dcf727 100644 --- a/modules/juce_audio_utils/players/juce_SoundPlayer.cpp +++ b/modules/juce_audio_utils/players/juce_SoundPlayer.cpp @@ -27,7 +27,7 @@ namespace juce { // This is an AudioTransportSource which will own it's assigned source -struct AudioSourceOwningTransportSource : public AudioTransportSource +struct AudioSourceOwningTransportSource final : public AudioTransportSource { AudioSourceOwningTransportSource (PositionableAudioSource* s, double sr) : source (s) { @@ -48,8 +48,8 @@ private: //============================================================================== // An AudioSourcePlayer which will remove itself from the AudioDeviceManager's // callback list once it finishes playing its source -struct AutoRemovingTransportSource : public AudioTransportSource, - private Timer +struct AutoRemovingTransportSource final : public AudioTransportSource, + private Timer { AutoRemovingTransportSource (MixerAudioSource& mixerToUse, AudioTransportSource* ts, bool ownSource, int samplesPerBlock, double requiredSampleRate) @@ -85,7 +85,7 @@ private: }; // An AudioSource which simply outputs a buffer -class AudioBufferSource : public PositionableAudioSource +class AudioBufferSource final : public PositionableAudioSource { public: AudioBufferSource (AudioBuffer* audioBuffer, bool ownBuffer, bool playOnAllChannels) diff --git a/modules/juce_core/containers/juce_AbstractFifo.cpp b/modules/juce_core/containers/juce_AbstractFifo.cpp index 916ece51c8..f55d2d9158 100644 --- a/modules/juce_core/containers/juce_AbstractFifo.cpp +++ b/modules/juce_core/containers/juce_AbstractFifo.cpp @@ -168,14 +168,14 @@ AbstractFifo::ScopedWrite AbstractFifo::write (int numToWrite) noexcept { ret //============================================================================== #if JUCE_UNIT_TESTS -class AbstractFifoTests : public UnitTest +class AbstractFifoTests final : public UnitTest { public: AbstractFifoTests() : UnitTest ("Abstract Fifo", UnitTestCategories::containers) {} - struct WriteThread : public Thread + struct WriteThread final : public Thread { WriteThread (AbstractFifo& f, int* b, Random rng) : Thread ("fifo writer"), fifo (f), buffer (b), random (rng) diff --git a/modules/juce_core/containers/juce_ArrayBase.cpp b/modules/juce_core/containers/juce_ArrayBase.cpp index b52f1060a9..a2335c04e7 100644 --- a/modules/juce_core/containers/juce_ArrayBase.cpp +++ b/modules/juce_core/containers/juce_ArrayBase.cpp @@ -99,7 +99,7 @@ static bool operator== (const ArrayBaseTestsHelpers::NonTriviallyCopyableType& n return tct == ntct; } -class ArrayBaseTests : public UnitTest +class ArrayBaseTests final : public UnitTest { using CopyableType = ArrayBaseTestsHelpers::TriviallyCopyableType; using NoncopyableType = ArrayBaseTestsHelpers::NonTriviallyCopyableType; @@ -545,7 +545,7 @@ private: virtual ~Base() = default; }; - struct Derived : Base + struct Derived final : public Base { }; diff --git a/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp b/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp index 23d1484b2d..156f2838a6 100644 --- a/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp +++ b/modules/juce_core/containers/juce_FixedSizeFunction_test.cpp @@ -65,7 +65,7 @@ String& operator<< (String& str, const ConstructCounts& c) << " }"; } -class FixedSizeFunctionTest : public UnitTest +class FixedSizeFunctionTest final : public UnitTest { static void toggleBool (bool& b) { b = ! b; } diff --git a/modules/juce_core/containers/juce_HashMap_test.cpp b/modules/juce_core/containers/juce_HashMap_test.cpp index a95ffa14da..9c07ba8b8b 100644 --- a/modules/juce_core/containers/juce_HashMap_test.cpp +++ b/modules/juce_core/containers/juce_HashMap_test.cpp @@ -23,7 +23,7 @@ namespace juce { -struct HashMapTest : public UnitTest +struct HashMapTest final : public UnitTest { HashMapTest() : UnitTest ("HashMap", UnitTestCategories::containers) diff --git a/modules/juce_core/containers/juce_ListenerList.cpp b/modules/juce_core/containers/juce_ListenerList.cpp index a7c9dd8d3d..3404ce889d 100644 --- a/modules/juce_core/containers/juce_ListenerList.cpp +++ b/modules/juce_core/containers/juce_ListenerList.cpp @@ -25,7 +25,7 @@ namespace juce #if JUCE_UNIT_TESTS -class ListenerListTests : public UnitTest +class ListenerListTests final : public UnitTest { public: //============================================================================== diff --git a/modules/juce_core/containers/juce_Optional_test.cpp b/modules/juce_core/containers/juce_Optional_test.cpp index b3e10de812..9853fb3141 100644 --- a/modules/juce_core/containers/juce_Optional_test.cpp +++ b/modules/juce_core/containers/juce_Optional_test.cpp @@ -31,7 +31,7 @@ struct ThrowOnMoveOrSwap }; static void swap (ThrowOnMoveOrSwap&, ThrowOnMoveOrSwap&) { throw std::bad_alloc{}; } -class OptionalUnitTest : public UnitTest +class OptionalUnitTest final : public UnitTest { public: OptionalUnitTest() : UnitTest ("Optional", UnitTestCategories::containers) {} @@ -297,7 +297,7 @@ public: } struct Foo {}; - struct Bar : Foo {}; + struct Bar final : public Foo {}; beginTest ("Can be constructed from compatible type"); { diff --git a/modules/juce_core/containers/juce_OwnedArray.cpp b/modules/juce_core/containers/juce_OwnedArray.cpp index e452a5613a..1dc0caaed8 100644 --- a/modules/juce_core/containers/juce_OwnedArray.cpp +++ b/modules/juce_core/containers/juce_OwnedArray.cpp @@ -35,7 +35,7 @@ static struct OwnedArrayTest : public UnitTest JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Base) }; - struct Derived : Base + struct Derived final : public Base { Derived() = default; diff --git a/modules/juce_core/containers/juce_ReferenceCountedArray.cpp b/modules/juce_core/containers/juce_ReferenceCountedArray.cpp index 313dbd9a2c..28ecb3baa4 100644 --- a/modules/juce_core/containers/juce_ReferenceCountedArray.cpp +++ b/modules/juce_core/containers/juce_ReferenceCountedArray.cpp @@ -25,7 +25,7 @@ namespace juce #if JUCE_UNIT_TESTS -class ReferenceCountedArrayTests : public UnitTest +class ReferenceCountedArrayTests final : public UnitTest { public: ReferenceCountedArrayTests() @@ -134,7 +134,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestBaseObj) }; - struct TestDerivedObj : public TestBaseObj + struct TestDerivedObj final : public TestBaseObj { using Ptr = ReferenceCountedObjectPtr; @@ -143,7 +143,7 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestDerivedObj) }; - struct DestructorObj : public ReferenceCountedObject + struct DestructorObj final : public ReferenceCountedObject { DestructorObj (ReferenceCountedArrayTests& p, ReferenceCountedArray& arr) diff --git a/modules/juce_core/containers/juce_SparseSet.cpp b/modules/juce_core/containers/juce_SparseSet.cpp index cddd96d966..cb7e184ab8 100644 --- a/modules/juce_core/containers/juce_SparseSet.cpp +++ b/modules/juce_core/containers/juce_SparseSet.cpp @@ -25,7 +25,7 @@ namespace juce #if JUCE_UNIT_TESTS -class SparseSetTests : public UnitTest +class SparseSetTests final : public UnitTest { public: SparseSetTests() diff --git a/modules/juce_core/containers/juce_Variant.cpp b/modules/juce_core/containers/juce_Variant.cpp index 9f6e1c2a38..ff4e5d1c68 100644 --- a/modules/juce_core/containers/juce_Variant.cpp +++ b/modules/juce_core/containers/juce_Variant.cpp @@ -401,7 +401,7 @@ struct var::VariantType } } - struct RefCountedArray : public ReferenceCountedObject + struct RefCountedArray final : public ReferenceCountedObject { RefCountedArray (const Array& a) : array (a) { incReferenceCount(); } RefCountedArray (Array&& a) : array (std::move (a)) { incReferenceCount(); } diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index e91204982a..486c61d3b2 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -1037,7 +1037,7 @@ MemoryMappedFile::MemoryMappedFile (const File& file, const Range& fileRa //============================================================================== #if JUCE_UNIT_TESTS -class FileTests : public UnitTest +class FileTests final : public UnitTest { public: FileTests() diff --git a/modules/juce_core/files/juce_FileInputStream.cpp b/modules/juce_core/files/juce_FileInputStream.cpp index 8a40a47d5e..5a658191e2 100644 --- a/modules/juce_core/files/juce_FileInputStream.cpp +++ b/modules/juce_core/files/juce_FileInputStream.cpp @@ -81,7 +81,7 @@ bool FileInputStream::setPosition (int64 pos) //============================================================================== #if JUCE_UNIT_TESTS -struct FileInputStreamTests : public UnitTest +struct FileInputStreamTests final : public UnitTest { FileInputStreamTests() : UnitTest ("FileInputStream", UnitTestCategories::streams) diff --git a/modules/juce_core/files/juce_FileSearchPath.cpp b/modules/juce_core/files/juce_FileSearchPath.cpp index 9b786ac05e..9a0a5350ed 100644 --- a/modules/juce_core/files/juce_FileSearchPath.cpp +++ b/modules/juce_core/files/juce_FileSearchPath.cpp @@ -190,7 +190,7 @@ bool FileSearchPath::isFileInPath (const File& fileToCheck, //============================================================================== #if JUCE_UNIT_TESTS -class FileSearchPathTests : public UnitTest +class FileSearchPathTests final : public UnitTest { public: FileSearchPathTests() : UnitTest ("FileSearchPath", UnitTestCategories::files) {} diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index f985d0a044..aa1394dc48 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -545,7 +545,7 @@ Result JSON::parseQuotedString (String::CharPointerType& t, var& result) //============================================================================== #if JUCE_UNIT_TESTS -class JSONTests : public UnitTest +class JSONTests final : public UnitTest { public: JSONTests() diff --git a/modules/juce_core/javascript/juce_JSONSerialisation_test.cpp b/modules/juce_core/javascript/juce_JSONSerialisation_test.cpp index 3357c1f079..7d6708c88b 100644 --- a/modules/juce_core/javascript/juce_JSONSerialisation_test.cpp +++ b/modules/juce_core/javascript/juce_JSONSerialisation_test.cpp @@ -377,7 +377,7 @@ struct TypeWithInnerVar } }; -class JSONSerialisationTest : public UnitTest +class JSONSerialisationTest final : public UnitTest { public: JSONSerialisationTest() : UnitTest ("JSONSerialisation", UnitTestCategories::json) {} diff --git a/modules/juce_core/javascript/juce_JSONUtils.cpp b/modules/juce_core/javascript/juce_JSONUtils.cpp index 36bdf1f6f0..88438e0ffa 100644 --- a/modules/juce_core/javascript/juce_JSONUtils.cpp +++ b/modules/juce_core/javascript/juce_JSONUtils.cpp @@ -146,7 +146,7 @@ bool JSONUtils::deepEqual (const var& a, const var& b) //============================================================================== #if JUCE_UNIT_TESTS -class JSONUtilsTests : public UnitTest +class JSONUtilsTests final : public UnitTest { public: JSONUtilsTests() : UnitTest ("JSONUtils", UnitTestCategories::json) {} diff --git a/modules/juce_core/javascript/juce_Javascript.cpp b/modules/juce_core/javascript/juce_Javascript.cpp index 74031e679d..a8b1f68ee3 100644 --- a/modules/juce_core/javascript/juce_Javascript.cpp +++ b/modules/juce_core/javascript/juce_Javascript.cpp @@ -57,7 +57,7 @@ namespace TokenTypes JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4702) //============================================================================== -struct JavascriptEngine::RootObject : public DynamicObject +struct JavascriptEngine::RootObject final : public DynamicObject { RootObject() { @@ -245,7 +245,7 @@ struct JavascriptEngine::RootObject : public DynamicObject struct Statement { Statement (const CodeLocation& l) noexcept : location (l) {} - virtual ~Statement() {} + virtual ~Statement() = default; enum ResultCode { ok = 0, returnWasHit, breakWasHit, continueWasHit }; virtual ResultCode perform (const Scope&, var*) const { return ok; } @@ -266,7 +266,7 @@ struct JavascriptEngine::RootObject : public DynamicObject using ExpPtr = std::unique_ptr; - struct BlockStatement : public Statement + struct BlockStatement final : public Statement { BlockStatement (const CodeLocation& l) noexcept : Statement (l) {} @@ -282,7 +282,7 @@ struct JavascriptEngine::RootObject : public DynamicObject OwnedArray statements; }; - struct IfStatement : public Statement + struct IfStatement final : public Statement { IfStatement (const CodeLocation& l) noexcept : Statement (l) {} @@ -295,7 +295,7 @@ struct JavascriptEngine::RootObject : public DynamicObject std::unique_ptr trueBranch, falseBranch; }; - struct VarStatement : public Statement + struct VarStatement final : public Statement { VarStatement (const CodeLocation& l) noexcept : Statement (l) {} @@ -309,7 +309,7 @@ struct JavascriptEngine::RootObject : public DynamicObject ExpPtr initialiser; }; - struct LoopStatement : public Statement + struct LoopStatement final : public Statement { LoopStatement (const CodeLocation& l, bool isDo) noexcept : Statement (l), isDoLoop (isDo) {} @@ -339,7 +339,7 @@ struct JavascriptEngine::RootObject : public DynamicObject bool isDoLoop; }; - struct ReturnStatement : public Statement + struct ReturnStatement final : public Statement { ReturnStatement (const CodeLocation& l, Expression* v) noexcept : Statement (l), returnValue (v) {} @@ -352,26 +352,26 @@ struct JavascriptEngine::RootObject : public DynamicObject ExpPtr returnValue; }; - struct BreakStatement : public Statement + struct BreakStatement final : public Statement { BreakStatement (const CodeLocation& l) noexcept : Statement (l) {} ResultCode perform (const Scope&, var*) const override { return breakWasHit; } }; - struct ContinueStatement : public Statement + struct ContinueStatement final : public Statement { ContinueStatement (const CodeLocation& l) noexcept : Statement (l) {} ResultCode perform (const Scope&, var*) const override { return continueWasHit; } }; - struct LiteralValue : public Expression + struct LiteralValue final : public Expression { LiteralValue (const CodeLocation& l, const var& v) noexcept : Expression (l), value (v) {} var getResult (const Scope&) const override { return value; } var value; }; - struct UnqualifiedName : public Expression + struct UnqualifiedName final : public Expression { UnqualifiedName (const CodeLocation& l, const Identifier& n) noexcept : Expression (l), name (n) {} @@ -388,7 +388,7 @@ struct JavascriptEngine::RootObject : public DynamicObject Identifier name; }; - struct DotOperator : public Expression + struct DotOperator final : public Expression { DotOperator (const CodeLocation& l, ExpPtr& p, const Identifier& c) noexcept : Expression (l), parent (p.release()), child (c) {} @@ -422,7 +422,7 @@ struct JavascriptEngine::RootObject : public DynamicObject Identifier child; }; - struct ArraySubscript : public Expression + struct ArraySubscript final : public Expression { ArraySubscript (const CodeLocation& l) noexcept : Expression (l) {} @@ -476,7 +476,7 @@ struct JavascriptEngine::RootObject : public DynamicObject ExpPtr object, index; }; - struct BinaryOperatorBase : public Expression + struct BinaryOperatorBase : public Expression { BinaryOperatorBase (const CodeLocation& l, ExpPtr& a, ExpPtr& b, TokenType op) noexcept : Expression (l), lhs (a.release()), rhs (b.release()), operation (op) {} @@ -485,7 +485,7 @@ struct JavascriptEngine::RootObject : public DynamicObject TokenType operation; }; - struct BinaryOperator : public BinaryOperatorBase + struct BinaryOperator : public BinaryOperatorBase { BinaryOperator (const CodeLocation& l, ExpPtr& a, ExpPtr& b, TokenType op) noexcept : BinaryOperatorBase (l, a, b, op) {} @@ -516,7 +516,7 @@ struct JavascriptEngine::RootObject : public DynamicObject { location.throwError (getTokenName (operation) + " is not allowed on the " + typeName + " type"); return {}; } }; - struct EqualsOp : public BinaryOperator + struct EqualsOp final : public BinaryOperator { EqualsOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::equals) {} var getWithUndefinedArg() const override { return true; } @@ -526,7 +526,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithArrayOrObject (const var& a, const var& b) const override { return a == b; } }; - struct NotEqualsOp : public BinaryOperator + struct NotEqualsOp final : public BinaryOperator { NotEqualsOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::notEquals) {} var getWithUndefinedArg() const override { return false; } @@ -536,7 +536,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithArrayOrObject (const var& a, const var& b) const override { return a != b; } }; - struct LessThanOp : public BinaryOperator + struct LessThanOp final : public BinaryOperator { LessThanOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::lessThan) {} var getWithDoubles (double a, double b) const override { return a < b; } @@ -544,7 +544,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithStrings (const String& a, const String& b) const override { return a < b; } }; - struct LessThanOrEqualOp : public BinaryOperator + struct LessThanOrEqualOp final : public BinaryOperator { LessThanOrEqualOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::lessThanOrEqual) {} var getWithDoubles (double a, double b) const override { return a <= b; } @@ -552,7 +552,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithStrings (const String& a, const String& b) const override { return a <= b; } }; - struct GreaterThanOp : public BinaryOperator + struct GreaterThanOp final : public BinaryOperator { GreaterThanOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::greaterThan) {} var getWithDoubles (double a, double b) const override { return a > b; } @@ -560,7 +560,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithStrings (const String& a, const String& b) const override { return a > b; } }; - struct GreaterThanOrEqualOp : public BinaryOperator + struct GreaterThanOrEqualOp final : public BinaryOperator { GreaterThanOrEqualOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::greaterThanOrEqual) {} var getWithDoubles (double a, double b) const override { return a >= b; } @@ -568,7 +568,7 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithStrings (const String& a, const String& b) const override { return a >= b; } }; - struct AdditionOp : public BinaryOperator + struct AdditionOp final : public BinaryOperator { AdditionOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::plus) {} var getWithDoubles (double a, double b) const override { return a + b; } @@ -576,95 +576,95 @@ struct JavascriptEngine::RootObject : public DynamicObject var getWithStrings (const String& a, const String& b) const override { return a + b; } }; - struct SubtractionOp : public BinaryOperator + struct SubtractionOp final : public BinaryOperator { SubtractionOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::minus) {} var getWithDoubles (double a, double b) const override { return a - b; } var getWithInts (int64 a, int64 b) const override { return a - b; } }; - struct MultiplyOp : public BinaryOperator + struct MultiplyOp final : public BinaryOperator { MultiplyOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::times) {} var getWithDoubles (double a, double b) const override { return a * b; } var getWithInts (int64 a, int64 b) const override { return a * b; } }; - struct DivideOp : public BinaryOperator + struct DivideOp final : public BinaryOperator { DivideOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::divide) {} var getWithDoubles (double a, double b) const override { return exactlyEqual (b, 0.0) ? std::numeric_limits::infinity() : a / b; } var getWithInts (int64 a, int64 b) const override { return b != 0 ? var ((double) a / (double) b) : var (std::numeric_limits::infinity()); } }; - struct ModuloOp : public BinaryOperator + struct ModuloOp final : public BinaryOperator { ModuloOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::modulo) {} var getWithDoubles (double a, double b) const override { return exactlyEqual (b, 0.0) ? std::numeric_limits::infinity() : fmod (a, b); } var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a % b) : var (std::numeric_limits::infinity()); } }; - struct BitwiseOrOp : public BinaryOperator + struct BitwiseOrOp final : public BinaryOperator { BitwiseOrOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::bitwiseOr) {} var getWithInts (int64 a, int64 b) const override { return a | b; } }; - struct BitwiseAndOp : public BinaryOperator + struct BitwiseAndOp final : public BinaryOperator { BitwiseAndOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::bitwiseAnd) {} var getWithInts (int64 a, int64 b) const override { return a & b; } }; - struct BitwiseXorOp : public BinaryOperator + struct BitwiseXorOp final : public BinaryOperator { BitwiseXorOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::bitwiseXor) {} var getWithInts (int64 a, int64 b) const override { return a ^ b; } }; - struct LeftShiftOp : public BinaryOperator + struct LeftShiftOp final : public BinaryOperator { LeftShiftOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::leftShift) {} var getWithInts (int64 a, int64 b) const override { return ((int) a) << (int) b; } }; - struct RightShiftOp : public BinaryOperator + struct RightShiftOp final : public BinaryOperator { RightShiftOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::rightShift) {} var getWithInts (int64 a, int64 b) const override { return ((int) a) >> (int) b; } }; - struct RightShiftUnsignedOp : public BinaryOperator + struct RightShiftUnsignedOp final : public BinaryOperator { RightShiftUnsignedOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::rightShiftUnsigned) {} var getWithInts (int64 a, int64 b) const override { return (int) (((uint32) a) >> (int) b); } }; - struct LogicalAndOp : public BinaryOperatorBase + struct LogicalAndOp final : public BinaryOperatorBase { LogicalAndOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperatorBase (l, a, b, TokenTypes::logicalAnd) {} var getResult (const Scope& s) const override { return lhs->getResult (s) && rhs->getResult (s); } }; - struct LogicalOrOp : public BinaryOperatorBase + struct LogicalOrOp final : public BinaryOperatorBase { LogicalOrOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperatorBase (l, a, b, TokenTypes::logicalOr) {} var getResult (const Scope& s) const override { return lhs->getResult (s) || rhs->getResult (s); } }; - struct TypeEqualsOp : public BinaryOperatorBase + struct TypeEqualsOp final : public BinaryOperatorBase { TypeEqualsOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperatorBase (l, a, b, TokenTypes::typeEquals) {} var getResult (const Scope& s) const override { return areTypeEqual (lhs->getResult (s), rhs->getResult (s)); } }; - struct TypeNotEqualsOp : public BinaryOperatorBase + struct TypeNotEqualsOp final : public BinaryOperatorBase { TypeNotEqualsOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperatorBase (l, a, b, TokenTypes::typeNotEquals) {} var getResult (const Scope& s) const override { return ! areTypeEqual (lhs->getResult (s), rhs->getResult (s)); } }; - struct ConditionalOp : public Expression + struct ConditionalOp final : public Expression { ConditionalOp (const CodeLocation& l) noexcept : Expression (l) {} @@ -674,7 +674,7 @@ struct JavascriptEngine::RootObject : public DynamicObject ExpPtr condition, trueBranch, falseBranch; }; - struct Assignment : public Expression + struct Assignment final : public Expression { Assignment (const CodeLocation& l, ExpPtr& dest, ExpPtr& source) noexcept : Expression (l), target (dest.release()), newValue (source.release()) {} @@ -688,7 +688,7 @@ struct JavascriptEngine::RootObject : public DynamicObject ExpPtr target, newValue; }; - struct SelfAssignment : public Expression + struct SelfAssignment : public Expression { SelfAssignment (const CodeLocation& l, Expression* dest, Expression* source) noexcept : Expression (l), target (dest), newValue (source) {} @@ -705,7 +705,7 @@ struct JavascriptEngine::RootObject : public DynamicObject TokenType op; }; - struct PostAssignment : public SelfAssignment + struct PostAssignment final : public SelfAssignment { PostAssignment (const CodeLocation& l, Expression* dest, Expression* source) noexcept : SelfAssignment (l, dest, source) {} @@ -717,7 +717,7 @@ struct JavascriptEngine::RootObject : public DynamicObject } }; - struct FunctionCall : public Expression + struct FunctionCall : public Expression { FunctionCall (const CodeLocation& l) noexcept : Expression (l) {} @@ -761,7 +761,7 @@ struct JavascriptEngine::RootObject : public DynamicObject OwnedArray arguments; }; - struct NewOperator : public FunctionCall + struct NewOperator final : public FunctionCall { NewOperator (const CodeLocation& l) noexcept : FunctionCall (l) {} @@ -784,7 +784,7 @@ struct JavascriptEngine::RootObject : public DynamicObject } }; - struct ObjectDeclaration : public Expression + struct ObjectDeclaration final : public Expression { ObjectDeclaration (const CodeLocation& l) noexcept : Expression (l) {} @@ -802,7 +802,7 @@ struct JavascriptEngine::RootObject : public DynamicObject OwnedArray initialisers; }; - struct ArrayDeclaration : public Expression + struct ArrayDeclaration final : public Expression { ArrayDeclaration (const CodeLocation& l) noexcept : Expression (l) {} @@ -823,7 +823,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct FunctionObject : public DynamicObject + struct FunctionObject final : public DynamicObject { FunctionObject() noexcept {} @@ -1056,7 +1056,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct ExpressionTreeBuilder : private TokenIterator + struct ExpressionTreeBuilder final : private TokenIterator { ExpressionTreeBuilder (const String code) : TokenIterator (code) {} @@ -1531,7 +1531,7 @@ struct JavascriptEngine::RootObject : public DynamicObject static String getString (Args a, int index) noexcept { return get (a, index).toString(); } //============================================================================== - struct ObjectClass : public DynamicObject + struct ObjectClass final : public DynamicObject { ObjectClass() { @@ -1545,7 +1545,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct ArrayClass : public DynamicObject + struct ArrayClass final : public DynamicObject { ArrayClass() { @@ -1650,7 +1650,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct StringClass : public DynamicObject + struct StringClass final : public DynamicObject { StringClass() { @@ -1692,7 +1692,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct MathClass : public DynamicObject + struct MathClass final : public DynamicObject { MathClass() { @@ -1763,7 +1763,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct JSONClass : public DynamicObject + struct JSONClass final : public DynamicObject { JSONClass() { setMethod ("stringify", stringify); } static Identifier getClassName() { static const Identifier i ("JSON"); return i; } @@ -1771,7 +1771,7 @@ struct JavascriptEngine::RootObject : public DynamicObject }; //============================================================================== - struct IntegerClass : public DynamicObject + struct IntegerClass final : public DynamicObject { IntegerClass() { setMethod ("parseInt", parseInt); } static Identifier getClassName() { static const Identifier i ("Integer"); return i; } diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index 941823d430..ba1e11f1c1 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -1296,7 +1296,7 @@ uint32 readLittleEndianBitsInBuffer (const void* buffer, uint32 startBit, uint32 //============================================================================== #if JUCE_UNIT_TESTS -class BigIntegerTests : public UnitTest +class BigIntegerTests final : public UnitTest { public: BigIntegerTests() diff --git a/modules/juce_core/maths/juce_Expression.cpp b/modules/juce_core/maths/juce_Expression.cpp index fefd5dd915..97a10bcdba 100644 --- a/modules/juce_core/maths/juce_Expression.cpp +++ b/modules/juce_core/maths/juce_Expression.cpp @@ -23,7 +23,7 @@ namespace juce { -class Expression::Term : public SingleThreadedReferenceCountedObject +class Expression::Term : public SingleThreadedReferenceCountedObject { public: Term() {} @@ -92,7 +92,7 @@ struct Expression::Helpers //============================================================================== /** An exception that can be thrown by Expression::evaluate(). */ - class EvaluationError : public std::exception + class EvaluationError final : public std::exception { public: EvaluationError (const String& desc) : description (desc) @@ -104,7 +104,7 @@ struct Expression::Helpers }; //============================================================================== - class Constant : public Term + class Constant final : public Term { public: Constant (double val, bool resolutionTarget) @@ -193,7 +193,7 @@ struct Expression::Helpers }; //============================================================================== - class SymbolTerm : public Term + class SymbolTerm final : public Term { public: explicit SymbolTerm (const String& sym) : symbol (sym) {} @@ -226,7 +226,7 @@ struct Expression::Helpers }; //============================================================================== - class Function : public Term + class Function final : public Term { public: explicit Function (const String& name) : functionName (name) {} @@ -297,7 +297,7 @@ struct Expression::Helpers }; //============================================================================== - class DotOperator : public BinaryTerm + class DotOperator final : public BinaryTerm { public: DotOperator (SymbolTerm* l, TermPtr r) : BinaryTerm (TermPtr (l), r) {} @@ -347,7 +347,7 @@ struct Expression::Helpers private: //============================================================================== - class EvaluationVisitor : public Scope::Visitor + class EvaluationVisitor final : public Scope::Visitor { public: EvaluationVisitor (const TermPtr& t, const int recursion) @@ -363,7 +363,7 @@ struct Expression::Helpers JUCE_DECLARE_NON_COPYABLE (EvaluationVisitor) }; - class SymbolVisitingVisitor : public Scope::Visitor + class SymbolVisitingVisitor final : public Scope::Visitor { public: SymbolVisitingVisitor (const TermPtr& t, SymbolVisitor& v, const int recursion) @@ -379,7 +379,7 @@ struct Expression::Helpers JUCE_DECLARE_NON_COPYABLE (SymbolVisitingVisitor) }; - class SymbolRenamingVisitor : public Scope::Visitor + class SymbolRenamingVisitor final : public Scope::Visitor { public: SymbolRenamingVisitor (const TermPtr& t, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_) @@ -402,7 +402,7 @@ struct Expression::Helpers }; //============================================================================== - class Negate : public Term + class Negate final : public Term { public: explicit Negate (const TermPtr& t) : input (t) @@ -447,7 +447,7 @@ struct Expression::Helpers }; //============================================================================== - class Add : public BinaryTerm + class Add final : public BinaryTerm { public: Add (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} @@ -471,7 +471,7 @@ struct Expression::Helpers }; //============================================================================== - class Subtract : public BinaryTerm + class Subtract final : public BinaryTerm { public: Subtract (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} @@ -500,7 +500,7 @@ struct Expression::Helpers }; //============================================================================== - class Multiply : public BinaryTerm + class Multiply final : public BinaryTerm { public: Multiply (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} @@ -523,7 +523,7 @@ struct Expression::Helpers }; //============================================================================== - class Divide : public BinaryTerm + class Divide final : public BinaryTerm { public: Divide (TermPtr l, TermPtr r) : BinaryTerm (l, r) {} @@ -621,7 +621,7 @@ struct Expression::Helpers } //============================================================================== - class SymbolCheckVisitor : public Term::SymbolVisitor + class SymbolCheckVisitor final : public Term::SymbolVisitor { public: SymbolCheckVisitor (const Symbol& s) : symbol (s) {} @@ -636,7 +636,7 @@ struct Expression::Helpers }; //============================================================================== - class SymbolListVisitor : public Term::SymbolVisitor + class SymbolListVisitor final : public Term::SymbolVisitor { public: SymbolListVisitor (Array& list_) : list (list_) {} diff --git a/modules/juce_core/maths/juce_Random.cpp b/modules/juce_core/maths/juce_Random.cpp index b98dc5e6f2..e8e4eb5254 100644 --- a/modules/juce_core/maths/juce_Random.cpp +++ b/modules/juce_core/maths/juce_Random.cpp @@ -164,7 +164,7 @@ void Random::fillBitsRandomly (BigInteger& arrayToChange, int startBit, int numB //============================================================================== #if JUCE_UNIT_TESTS -class RandomTests : public UnitTest +class RandomTests final : public UnitTest { public: RandomTests() diff --git a/modules/juce_core/misc/juce_EnumHelpers_test.cpp b/modules/juce_core/misc/juce_EnumHelpers_test.cpp index 29b86022b5..c8e40f0b21 100644 --- a/modules/juce_core/misc/juce_EnumHelpers_test.cpp +++ b/modules/juce_core/misc/juce_EnumHelpers_test.cpp @@ -35,7 +35,7 @@ enum class TestEnum JUCE_DECLARE_SCOPED_ENUM_BITWISE_OPERATORS (TestEnum) } -class EnumHelperTest : public UnitTest +class EnumHelperTest final : public UnitTest { public: EnumHelperTest() : UnitTest ("EnumHelpers", UnitTestCategories::containers) {} diff --git a/modules/juce_core/native/juce_Files_android.cpp b/modules/juce_core/native/juce_Files_android.cpp index efd43534d2..b91e05339c 100644 --- a/modules/juce_core/native/juce_Files_android.cpp +++ b/modules/juce_core/native/juce_Files_android.cpp @@ -487,7 +487,7 @@ private: }; //============================================================================== -struct AndroidContentUriOutputStream : public OutputStream +struct AndroidContentUriOutputStream final : public OutputStream { explicit AndroidContentUriOutputStream (LocalRef&& streamIn) : stream (std::move (streamIn)) {} @@ -572,7 +572,7 @@ struct AndroidStreamHelpers }; //============================================================================== -struct AndroidContentUriInputStream : public InputStream +struct AndroidContentUriInputStream final : public InputStream { explicit AndroidContentUriInputStream (const GlobalRef& uriIn) : uri (uriIn), @@ -824,7 +824,7 @@ void File::revealToUser() const } //============================================================================== -class SingleMediaScanner : public MediaScannerConnectionClient +class SingleMediaScanner final : public MediaScannerConnectionClient { public: SingleMediaScanner (const String& filename) diff --git a/modules/juce_core/native/juce_Network_mac.mm b/modules/juce_core/native/juce_Network_mac.mm index 901214b256..9a5eed8be6 100644 --- a/modules/juce_core/native/juce_Network_mac.mm +++ b/modules/juce_core/native/juce_Network_mac.mm @@ -107,7 +107,7 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments ([[maybe_unused]] const Str } //============================================================================== -class URLConnectionStateBase : public Thread +class URLConnectionStateBase : public Thread { public: explicit URLConnectionStateBase (NSURLRequest* req, int maxRedirects) @@ -155,7 +155,7 @@ private: // so we'll turn off deprecation warnings. This code will be removed at some point // in the future. JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated") -class URLConnectionStatePreYosemite : public URLConnectionStateBase +class URLConnectionStatePreYosemite final : public URLConnectionStateBase { public: URLConnectionStatePreYosemite (NSURLRequest* req, const int maxRedirects) @@ -331,7 +331,7 @@ public: private: //============================================================================== - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCENetworkDelegate_") { @@ -391,7 +391,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE #endif //============================================================================== -class API_AVAILABLE (macos (10.9)) URLConnectionState : public URLConnectionStateBase +class API_AVAILABLE (macos (10.9)) URLConnectionState final : public URLConnectionStateBase { public: URLConnectionState (NSURLRequest* req, const int maxRedirects) @@ -599,7 +599,7 @@ public: private: //============================================================================== - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCE_URLDelegate_") { @@ -669,7 +669,7 @@ private: //============================================================================== #if JUCE_IOS -struct BackgroundDownloadTask : public URL::DownloadTask +struct BackgroundDownloadTask final : public URL::DownloadTask { BackgroundDownloadTask (const URL& urlToUse, const File& targetLocationToUse, @@ -869,7 +869,7 @@ struct BackgroundDownloadTask : public URL::DownloadTask } //============================================================================== - struct DelegateClass : public ObjCClass> + struct DelegateClass final : public ObjCClass> { DelegateClass() : ObjCClass> ("JUCE_URLDelegate_") { diff --git a/modules/juce_core/native/juce_ObjCHelpers_mac.h b/modules/juce_core/native/juce_ObjCHelpers_mac.h index c72ccd0769..cb5d8e24b8 100644 --- a/modules/juce_core/native/juce_ObjCHelpers_mac.h +++ b/modules/juce_core/native/juce_ObjCHelpers_mac.h @@ -301,7 +301,7 @@ struct ObjCClass jassert (cls != nil); } - ~ObjCClass() + virtual ~ObjCClass() { auto kvoSubclassName = String ("NSKVONotifying_") + class_getName (cls); diff --git a/modules/juce_core/native/juce_RuntimePermissions_android.cpp b/modules/juce_core/native/juce_RuntimePermissions_android.cpp index 8b465096ad..a46067c52e 100644 --- a/modules/juce_core/native/juce_RuntimePermissions_android.cpp +++ b/modules/juce_core/native/juce_RuntimePermissions_android.cpp @@ -104,7 +104,7 @@ struct PermissionsRequest }; //============================================================================== -struct PermissionsOverlay : FragmentOverlay +struct PermissionsOverlay final : public FragmentOverlay { PermissionsOverlay (CriticalSection& cs) : overlayGuard (cs) {} ~PermissionsOverlay() override = default; diff --git a/modules/juce_core/native/juce_Threads_android.cpp b/modules/juce_core/native/juce_Threads_android.cpp index 21bb05f9e1..efbf3a9f6c 100644 --- a/modules/juce_core/native/juce_Threads_android.cpp +++ b/modules/juce_core/native/juce_Threads_android.cpp @@ -94,7 +94,7 @@ extern "C" jint JNIEXPORT JNI_OnLoad (JavaVM* vm, void*) } //============================================================================== -class JuceActivityWatcher : public ActivityLifecycleCallbacks +class JuceActivityWatcher final : public ActivityLifecycleCallbacks { public: JuceActivityWatcher() diff --git a/modules/juce_core/network/juce_IPAddress.cpp b/modules/juce_core/network/juce_IPAddress.cpp index f9394112c0..e2880507ff 100644 --- a/modules/juce_core/network/juce_IPAddress.cpp +++ b/modules/juce_core/network/juce_IPAddress.cpp @@ -377,7 +377,7 @@ Array IPAddress::getAllAddresses (bool includeIPv6) //============================================================================== #if JUCE_UNIT_TESTS -struct IPAddressTests : public UnitTest +struct IPAddressTests final : public UnitTest { IPAddressTests() : UnitTest ("IPAddress", UnitTestCategories::networking) diff --git a/modules/juce_core/network/juce_NamedPipe.cpp b/modules/juce_core/network/juce_NamedPipe.cpp index c47aa5c9e4..a42e066bc2 100644 --- a/modules/juce_core/network/juce_NamedPipe.cpp +++ b/modules/juce_core/network/juce_NamedPipe.cpp @@ -69,7 +69,7 @@ String NamedPipe::getName() const //============================================================================== #if JUCE_UNIT_TESTS -class NamedPipeTests : public UnitTest +class NamedPipeTests final : public UnitTest { public: //============================================================================== @@ -200,7 +200,7 @@ public: private: //============================================================================== - struct NamedPipeThread : public Thread + struct NamedPipeThread : public Thread { NamedPipeThread (const String& tName, const String& pName, bool shouldCreatePipe, WaitableEvent& completed) @@ -220,7 +220,7 @@ private: }; //============================================================================== - struct SenderThread : public NamedPipeThread + struct SenderThread final : public NamedPipeThread { SenderThread (const String& pName, bool shouldCreatePipe, WaitableEvent& completed, int sData) @@ -243,7 +243,7 @@ private: }; //============================================================================== - struct ReceiverThread : public NamedPipeThread + struct ReceiverThread final : public NamedPipeThread { ReceiverThread (const String& pName, bool shouldCreatePipe, WaitableEvent& completed) diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index c020720b2a..c788ba6b17 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -794,7 +794,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC //============================================================================== #if JUCE_UNIT_TESTS -struct SocketTests : public UnitTest +struct SocketTests final : public UnitTest { SocketTests() : UnitTest ("Sockets", UnitTestCategories::networking) diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 7acd260b06..878e792871 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -23,8 +23,8 @@ namespace juce { -struct FallbackDownloadTask : public URL::DownloadTask, - public Thread +struct FallbackDownloadTask final : public URL::DownloadTask, + public Thread { FallbackDownloadTask (std::unique_ptr outputStreamToUse, size_t bufferSizeToUse, @@ -598,7 +598,7 @@ template struct iOSFileStreamWrapperFlush { static void flu template <> struct iOSFileStreamWrapperFlush { static void flush (OutputStream* o) { o->flush(); } }; template -class iOSFileStreamWrapper : public Stream +class iOSFileStreamWrapper final : public Stream { public: iOSFileStreamWrapper (URL& urlToUse) @@ -769,7 +769,7 @@ std::unique_ptr URL::createInputStream (const InputStreamOptions& o return stream; }(); - struct ProgressCallbackCaller : public WebInputStream::Listener + struct ProgressCallbackCaller final : public WebInputStream::Listener { ProgressCallbackCaller (std::function progressCallbackToUse) : callback (std::move (progressCallbackToUse)) diff --git a/modules/juce_core/streams/juce_BufferedInputStream.cpp b/modules/juce_core/streams/juce_BufferedInputStream.cpp index fdde48a6a9..ab94eac9bc 100644 --- a/modules/juce_core/streams/juce_BufferedInputStream.cpp +++ b/modules/juce_core/streams/juce_BufferedInputStream.cpp @@ -185,7 +185,7 @@ String BufferedInputStream::readString() //============================================================================== #if JUCE_UNIT_TESTS -struct BufferedInputStreamTests : public UnitTest +struct BufferedInputStreamTests final : public UnitTest { template static void applyImpl (Fn&& fn, std::index_sequence, Values&& values) diff --git a/modules/juce_core/streams/juce_MemoryInputStream.cpp b/modules/juce_core/streams/juce_MemoryInputStream.cpp index 800646731e..ee62517e62 100644 --- a/modules/juce_core/streams/juce_MemoryInputStream.cpp +++ b/modules/juce_core/streams/juce_MemoryInputStream.cpp @@ -104,7 +104,7 @@ void MemoryInputStream::skipNextBytes (int64 numBytesToSkip) //============================================================================== #if JUCE_UNIT_TESTS -class MemoryStreamTests : public UnitTest +class MemoryStreamTests final : public UnitTest { public: MemoryStreamTests() diff --git a/modules/juce_core/streams/juce_SubregionStream.cpp b/modules/juce_core/streams/juce_SubregionStream.cpp index bb2572a1c1..c4c63353aa 100644 --- a/modules/juce_core/streams/juce_SubregionStream.cpp +++ b/modules/juce_core/streams/juce_SubregionStream.cpp @@ -83,7 +83,7 @@ bool SubregionStream::isExhausted() //============================================================================== #if JUCE_UNIT_TESTS -struct SubregionInputStreamTests : public UnitTest +struct SubregionInputStreamTests final : public UnitTest { SubregionInputStreamTests() : UnitTest ("SubregionInputStream", UnitTestCategories::streams) diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 0f004429dc..3d81430b5b 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -292,7 +292,7 @@ bool SystemStats::isRunningInAppExtensionSandbox() noexcept #if JUCE_UNIT_TESTS -class UniqueHardwareIDTest : public UnitTest +class UniqueHardwareIDTest final : public UnitTest { public: //============================================================================== diff --git a/modules/juce_core/text/juce_Base64.cpp b/modules/juce_core/text/juce_Base64.cpp index 7190b6ee97..d7f9ac0560 100644 --- a/modules/juce_core/text/juce_Base64.cpp +++ b/modules/juce_core/text/juce_Base64.cpp @@ -123,7 +123,7 @@ String Base64::toBase64 (const String& text) //============================================================================== #if JUCE_UNIT_TESTS -class Base64Tests : public UnitTest +class Base64Tests final : public UnitTest { public: Base64Tests() diff --git a/modules/juce_core/text/juce_CharacterFunctions.cpp b/modules/juce_core/text/juce_CharacterFunctions.cpp index 407e70a688..024fe61ea0 100644 --- a/modules/juce_core/text/juce_CharacterFunctions.cpp +++ b/modules/juce_core/text/juce_CharacterFunctions.cpp @@ -379,7 +379,7 @@ void withAllPrefixesAndSuffixes (const std::vector& prefixes, } template -class CharacterFunctionsTests : public UnitTest +class CharacterFunctionsTests final : public UnitTest { public: using CharType = typename CharPointerType::CharType; diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index f303c0f764..c55426084d 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -439,7 +439,7 @@ namespace NumberToStringConverters return printDigits (t, v); } - struct StackArrayStream : public std::basic_streambuf> + struct StackArrayStream final : public std::basic_streambuf> { explicit StackArrayStream (char* d) { @@ -2319,7 +2319,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC #define STRINGIFY2(X) #X #define STRINGIFY(X) STRINGIFY2(X) -class StringTests : public UnitTest +class StringTests final : public UnitTest { public: StringTests() diff --git a/modules/juce_core/text/juce_StringPairArray.cpp b/modules/juce_core/text/juce_StringPairArray.cpp index ecc0c82b64..efe8fa4b7a 100644 --- a/modules/juce_core/text/juce_StringPairArray.cpp +++ b/modules/juce_core/text/juce_StringPairArray.cpp @@ -214,7 +214,7 @@ static String operator""_S (const char* chars, size_t) return String { chars }; } -class StringPairArrayTests : public UnitTest +class StringPairArrayTests final : public UnitTest { public: StringPairArrayTests() diff --git a/modules/juce_core/text/juce_TextDiff.cpp b/modules/juce_core/text/juce_TextDiff.cpp index 03f30fbbeb..c6f47d7327 100644 --- a/modules/juce_core/text/juce_TextDiff.cpp +++ b/modules/juce_core/text/juce_TextDiff.cpp @@ -224,7 +224,7 @@ String TextDiff::Change::appliedTo (const String& text) const noexcept //============================================================================== #if JUCE_UNIT_TESTS -class DiffTests : public UnitTest +class DiffTests final : public UnitTest { public: DiffTests() diff --git a/modules/juce_core/threads/juce_ChildProcess.cpp b/modules/juce_core/threads/juce_ChildProcess.cpp index 1e559b1c93..3a1d9cf073 100644 --- a/modules/juce_core/threads/juce_ChildProcess.cpp +++ b/modules/juce_core/threads/juce_ChildProcess.cpp @@ -85,7 +85,7 @@ String ChildProcess::readAllProcessOutput() //============================================================================== #if JUCE_UNIT_TESTS -class ChildProcessTests : public UnitTest +class ChildProcessTests final : public UnitTest { public: ChildProcessTests() diff --git a/modules/juce_core/threads/juce_HighResolutionTimer.cpp b/modules/juce_core/threads/juce_HighResolutionTimer.cpp index 62ed5b6598..34617564ce 100644 --- a/modules/juce_core/threads/juce_HighResolutionTimer.cpp +++ b/modules/juce_core/threads/juce_HighResolutionTimer.cpp @@ -138,7 +138,7 @@ bool HighResolutionTimer::isTimerRunning() const noexcept //============================================================================== #if JUCE_UNIT_TESTS -class HighResolutionTimerTests : public UnitTest +class HighResolutionTimerTests final : public UnitTest { public: HighResolutionTimerTests() @@ -411,7 +411,7 @@ public: } } - class Timer : public HighResolutionTimer + class Timer final : public HighResolutionTimer { public: explicit Timer (std::function fn) diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index 98e905531d..af0b4f9fa9 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -48,7 +48,7 @@ Thread::~Thread() //============================================================================== // Use a ref-counted object to hold this shared data, so that it can outlive its static // shared pointer when threads are still running during static shutdown. -struct CurrentThreadHolder : public ReferenceCountedObject +struct CurrentThreadHolder final : public ReferenceCountedObject { CurrentThreadHolder() noexcept {} @@ -296,7 +296,7 @@ void Thread::notify() const } //============================================================================== -struct LambdaThread : public Thread +struct LambdaThread final : public Thread { LambdaThread (std::function&& f) : Thread ("anonymous"), fn (std::move (f)) {} @@ -354,7 +354,7 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() noexcept //============================================================================== #if JUCE_UNIT_TESTS -class AtomicTests : public UnitTest +class AtomicTests final : public UnitTest { public: AtomicTests() @@ -478,8 +478,8 @@ public: static AtomicTests atomicUnitTests; //============================================================================== -class ThreadLocalValueUnitTest : public UnitTest, - private Thread +class ThreadLocalValueUnitTest final : public UnitTest, + private Thread { public: ThreadLocalValueUnitTest() diff --git a/modules/juce_core/threads/juce_ThreadPool.cpp b/modules/juce_core/threads/juce_ThreadPool.cpp index 16081c7510..b6351f7106 100644 --- a/modules/juce_core/threads/juce_ThreadPool.cpp +++ b/modules/juce_core/threads/juce_ThreadPool.cpp @@ -23,7 +23,7 @@ namespace juce { -struct ThreadPool::ThreadPoolThread : public Thread +struct ThreadPool::ThreadPoolThread final : public Thread { ThreadPoolThread (ThreadPool& p, const Options& options) : Thread { options.threadName, options.threadStackSizeBytes }, @@ -154,7 +154,7 @@ void ThreadPool::addJob (ThreadPoolJob* job, bool deleteJobWhenFinished) void ThreadPool::addJob (std::function jobToRun) { - struct LambdaJobWrapper : public ThreadPoolJob + struct LambdaJobWrapper final : public ThreadPoolJob { LambdaJobWrapper (std::function j) : ThreadPoolJob ("lambda"), job (j) {} JobStatus runJob() override { return job(); } @@ -167,7 +167,7 @@ void ThreadPool::addJob (std::function jobToRun) void ThreadPool::addJob (std::function jobToRun) { - struct LambdaJobWrapper : public ThreadPoolJob + struct LambdaJobWrapper final : public ThreadPoolJob { LambdaJobWrapper (std::function j) : ThreadPoolJob ("lambda"), job (std::move (j)) {} JobStatus runJob() override { job(); return ThreadPoolJob::jobHasFinished; } diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp index f2032e272f..66ce3e54d3 100644 --- a/modules/juce_core/time/juce_Time.cpp +++ b/modules/juce_core/time/juce_Time.cpp @@ -611,7 +611,7 @@ Time Time::getCompilationDate() //============================================================================== #if JUCE_UNIT_TESTS -class TimeTests : public UnitTest +class TimeTests final : public UnitTest { public: TimeTests() diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index f3d8ab0f99..d3ba6958e6 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -993,7 +993,7 @@ void XmlElement::deleteAllTextElements() noexcept //============================================================================== #if JUCE_UNIT_TESTS -class XmlElementTests : public UnitTest +class XmlElementTests final : public UnitTest { public: XmlElementTests() diff --git a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp index af89f3d393..1388ac70df 100644 --- a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp @@ -159,7 +159,7 @@ bool GZIPCompressorOutputStream::setPosition (int64 /*newPosition*/) //============================================================================== #if JUCE_UNIT_TESTS -struct GZIPTests : public UnitTest +struct GZIPTests final : public UnitTest { GZIPTests() : UnitTest ("GZIP", UnitTestCategories::compression) diff --git a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp index 9252d57f84..e6734bbdb2 100644 --- a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp @@ -294,7 +294,7 @@ bool GZIPDecompressorInputStream::setPosition (int64 newPos) //============================================================================== #if JUCE_UNIT_TESTS -struct GZIPDecompressorInputStreamTests : public UnitTest +struct GZIPDecompressorInputStreamTests final : public UnitTest { GZIPDecompressorInputStreamTests() : UnitTest ("GZIPDecompressorInputStreamTests", UnitTestCategories::streams) diff --git a/modules/juce_core/zip/juce_ZipFile.cpp b/modules/juce_core/zip/juce_ZipFile.cpp index 4bdd518fd7..8ec13c9239 100644 --- a/modules/juce_core/zip/juce_ZipFile.cpp +++ b/modules/juce_core/zip/juce_ZipFile.cpp @@ -136,7 +136,7 @@ static bool hasSymbolicPart (const File& root, const File& f) } //============================================================================== -struct ZipFile::ZipInputStream : public InputStream +struct ZipFile::ZipInputStream final : public InputStream { ZipInputStream (ZipFile& zf, const ZipFile::ZipEntryHolder& zei) : file (zf), @@ -670,7 +670,7 @@ bool ZipFile::Builder::writeToStream (OutputStream& target, double* const progre //============================================================================== #if JUCE_UNIT_TESTS -struct ZIPTests : public UnitTest +struct ZIPTests final : public UnitTest { ZIPTests() : UnitTest ("ZIP", UnitTestCategories::compression) diff --git a/modules/juce_cryptography/encryption/juce_BlowFish.cpp b/modules/juce_cryptography/encryption/juce_BlowFish.cpp index d3fd9bd7f4..71055245fc 100644 --- a/modules/juce_cryptography/encryption/juce_BlowFish.cpp +++ b/modules/juce_cryptography/encryption/juce_BlowFish.cpp @@ -369,7 +369,7 @@ int BlowFish::unpad (const void* data, size_t size) noexcept //============================================================================== #if JUCE_UNIT_TESTS -class BlowFishTests : public UnitTest +class BlowFishTests final : public UnitTest { public: BlowFishTests() diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index 822388a3a2..d8e325d529 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -268,7 +268,7 @@ bool MD5::operator!= (const MD5& other) const noexcept { return ! operator== ( //============================================================================== #if JUCE_UNIT_TESTS -class MD5Tests : public UnitTest +class MD5Tests final : public UnitTest { public: MD5Tests() diff --git a/modules/juce_cryptography/hashing/juce_SHA256.cpp b/modules/juce_cryptography/hashing/juce_SHA256.cpp index 44e9a4c8f0..284dce9205 100644 --- a/modules/juce_cryptography/hashing/juce_SHA256.cpp +++ b/modules/juce_cryptography/hashing/juce_SHA256.cpp @@ -215,7 +215,7 @@ bool SHA256::operator!= (const SHA256& other) const noexcept { return ! operato //============================================================================== #if JUCE_UNIT_TESTS -class SHA256Tests : public UnitTest +class SHA256Tests final : public UnitTest { public: SHA256Tests() diff --git a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp index 001f108a2f..e5c9aec9ec 100644 --- a/modules/juce_cryptography/hashing/juce_Whirlpool.cpp +++ b/modules/juce_cryptography/hashing/juce_Whirlpool.cpp @@ -616,7 +616,7 @@ bool Whirlpool::operator!= (const Whirlpool& other) const noexcept { return ! o //============================================================================== #if JUCE_UNIT_TESTS -class WhirlpoolTests : public UnitTest +class WhirlpoolTests final : public UnitTest { public: WhirlpoolTests() diff --git a/modules/juce_data_structures/values/juce_CachedValue.cpp b/modules/juce_data_structures/values/juce_CachedValue.cpp index c056a8614a..c69a0a4d98 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.cpp +++ b/modules/juce_data_structures/values/juce_CachedValue.cpp @@ -28,7 +28,7 @@ namespace juce #if JUCE_UNIT_TESTS -class CachedValueTests : public UnitTest +class CachedValueTests final : public UnitTest { public: CachedValueTests() diff --git a/modules/juce_data_structures/values/juce_Value.cpp b/modules/juce_data_structures/values/juce_Value.cpp index 4b5c5fe636..18f1124591 100644 --- a/modules/juce_data_structures/values/juce_Value.cpp +++ b/modules/juce_data_structures/values/juce_Value.cpp @@ -64,7 +64,7 @@ void Value::ValueSource::sendChangeMessage (const bool synchronous) } //============================================================================== -class SimpleValueSource : public Value::ValueSource +class SimpleValueSource final : public Value::ValueSource { public: SimpleValueSource() diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index a3903d9f58..3b324c2d96 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -26,7 +26,7 @@ namespace juce { -class ValueTree::SharedObject : public ReferenceCountedObject +class ValueTree::SharedObject final : public ReferenceCountedObject { public: using Ptr = ReferenceCountedObjectPtr; @@ -408,7 +408,7 @@ public: } //============================================================================== - struct SetPropertyAction : public UndoableAction + struct SetPropertyAction final : public UndoableAction { SetPropertyAction (Ptr targetObject, const Identifier& propertyName, const var& newVal, const var& oldVal, bool isAdding, bool isDeleting, @@ -472,7 +472,7 @@ public: }; //============================================================================== - struct AddOrRemoveChildAction : public UndoableAction + struct AddOrRemoveChildAction final : public UndoableAction { AddOrRemoveChildAction (Ptr parentObject, int index, SharedObject* newChild) : target (std::move (parentObject)), @@ -524,7 +524,7 @@ public: }; //============================================================================== - struct MoveChildAction : public UndoableAction + struct MoveChildAction final : public UndoableAction { MoveChildAction (Ptr parentObject, int fromIndex, int toIndex) noexcept : parent (std::move (parentObject)), startIndex (fromIndex), endIndex (toIndex) @@ -809,8 +809,8 @@ int ValueTree::getReferenceCount() const noexcept } //============================================================================== -struct ValueTreePropertyValueSource : public Value::ValueSource, - private ValueTree::Listener +struct ValueTreePropertyValueSource final : public Value::ValueSource, + private ValueTree::Listener { ValueTreePropertyValueSource (const ValueTree& vt, const Identifier& prop, UndoManager* um, bool sync) : tree (vt), property (prop), undoManager (um), updateSynchronously (sync) @@ -1118,7 +1118,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC //============================================================================== #if JUCE_UNIT_TESTS -class ValueTreeTests : public UnitTest +class ValueTreeTests final : public UnitTest { public: ValueTreeTests() diff --git a/modules/juce_data_structures/values/juce_ValueTreePropertyWithDefault_test.cpp b/modules/juce_data_structures/values/juce_ValueTreePropertyWithDefault_test.cpp index 0009f6a9a1..cbad98a730 100644 --- a/modules/juce_data_structures/values/juce_ValueTreePropertyWithDefault_test.cpp +++ b/modules/juce_data_structures/values/juce_ValueTreePropertyWithDefault_test.cpp @@ -26,7 +26,7 @@ namespace juce { -class ValueTreePropertyWithDefaultTests : public UnitTest +class ValueTreePropertyWithDefaultTests final : public UnitTest { public: ValueTreePropertyWithDefaultTests() diff --git a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp index f02e6eeef5..6b2fbaf943 100644 --- a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp +++ b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp @@ -32,7 +32,7 @@ String& operator<< (String& str, SIMDRegister) { return str; } #endif template -class AudioBlockUnitTests : public UnitTest +class AudioBlockUnitTests final : public UnitTest { public: //============================================================================== diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp index ebd125d9bf..c7e64e064a 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp +++ b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp @@ -101,7 +101,7 @@ namespace SIMDRegister_test_internal // These tests need to be strictly run on all platforms supported by JUCE as the // SIMD code is highly platform dependent. -class SIMDRegisterUnitTests : public UnitTest +class SIMDRegisterUnitTests final : public UnitTest { public: template struct Tag {}; diff --git a/modules/juce_dsp/frequency/juce_Convolution.cpp b/modules/juce_dsp/frequency/juce_Convolution.cpp index b23fc6c418..bdc163a2d0 100644 --- a/modules/juce_dsp/frequency/juce_Convolution.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution.cpp @@ -70,7 +70,7 @@ private: std::vector storage; }; -class BackgroundMessageQueue : private Thread +class BackgroundMessageQueue : private Thread { public: explicit BackgroundMessageQueue (int entries) @@ -843,7 +843,7 @@ static void setImpulseResponse (ConvolutionEngineFactory& factory, // this object when adding commands to the background message queue. // That way, we can avoid dangling references in the background thread in the case // that a Convolution instance is deleted before the background message queue. -class ConvolutionEngineQueue : public std::enable_shared_from_this +class ConvolutionEngineQueue final : public std::enable_shared_from_this { public: ConvolutionEngineQueue (BackgroundMessageQueue& queue, diff --git a/modules/juce_dsp/frequency/juce_Convolution_test.cpp b/modules/juce_dsp/frequency/juce_Convolution_test.cpp index dbbf607c13..88ed1d7429 100644 --- a/modules/juce_dsp/frequency/juce_Convolution_test.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution_test.cpp @@ -34,7 +34,7 @@ namespace juce::dsp namespace { -class ConvolutionTest : public UnitTest +class ConvolutionTest final : public UnitTest { template static void nTimes (int n, Callback&& callback) diff --git a/modules/juce_dsp/frequency/juce_FFT.cpp b/modules/juce_dsp/frequency/juce_FFT.cpp index 3bf5bda5ab..481b905373 100644 --- a/modules/juce_dsp/frequency/juce_FFT.cpp +++ b/modules/juce_dsp/frequency/juce_FFT.cpp @@ -77,7 +77,7 @@ struct FFT::EngineImpl : public FFT::Engine //============================================================================== //============================================================================== -struct FFTFallback : public FFT::Instance +struct FFTFallback final : public FFT::Instance { // this should have the least priority of all engines static constexpr int priority = -1; @@ -432,7 +432,7 @@ FFT::EngineImpl fftFallback; //============================================================================== //============================================================================== #if (JUCE_MAC || JUCE_IOS) && JUCE_USE_VDSP_FRAMEWORK -struct AppleFFT : public FFT::Instance +struct AppleFFT final : public FFT::Instance { static constexpr int priority = 5; @@ -731,7 +731,7 @@ FFT::EngineImpl fftwEngine; //============================================================================== //============================================================================== #if JUCE_DSP_USE_INTEL_MKL -struct IntelFFT : public FFT::Instance +struct IntelFFT final : public FFT::Instance { static constexpr int priority = 8; @@ -817,7 +817,7 @@ FFT::EngineImpl fftwEngine; // setting at 'Project' > 'Properties' > 'Configuration Properties' > 'Intel // Performance Libraries' > 'Use Intel(R) IPP' #if _IPP_SEQUENTIAL_STATIC || _IPP_SEQUENTIAL_DYNAMIC || _IPP_PARALLEL_STATIC || _IPP_PARALLEL_DYNAMIC -class IntelPerformancePrimitivesFFT : public FFT::Instance +class IntelPerformancePrimitivesFFT final : public FFT::Instance { public: static constexpr auto priority = 9; diff --git a/modules/juce_dsp/frequency/juce_FFT_test.cpp b/modules/juce_dsp/frequency/juce_FFT_test.cpp index 36d025c1dc..3cf20e119c 100644 --- a/modules/juce_dsp/frequency/juce_FFT_test.cpp +++ b/modules/juce_dsp/frequency/juce_FFT_test.cpp @@ -26,7 +26,7 @@ namespace juce::dsp { -struct FFTUnitTest : public UnitTest +struct FFTUnitTest final : public UnitTest { FFTUnitTest() : UnitTest ("FFT", UnitTestCategories::dsp) diff --git a/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp b/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp index a003413c38..94bf27baf5 100644 --- a/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp +++ b/modules/juce_dsp/maths/juce_LogRampedValue_test.cpp @@ -28,7 +28,7 @@ namespace juce::dsp static CommonSmoothedValueTests > commonLogRampedValueTests; -class LogRampedValueTests : public UnitTest +class LogRampedValueTests final : public UnitTest { public: LogRampedValueTests() diff --git a/modules/juce_dsp/maths/juce_Matrix_test.cpp b/modules/juce_dsp/maths/juce_Matrix_test.cpp index f13d93a250..a6686acfb8 100644 --- a/modules/juce_dsp/maths/juce_Matrix_test.cpp +++ b/modules/juce_dsp/maths/juce_Matrix_test.cpp @@ -26,7 +26,7 @@ namespace juce::dsp { -struct LinearAlgebraUnitTest : public UnitTest +struct LinearAlgebraUnitTest final : public UnitTest { LinearAlgebraUnitTest() : UnitTest ("Linear Algebra UnitTests", UnitTestCategories::dsp) diff --git a/modules/juce_dsp/processors/juce_DryWetMixer.cpp b/modules/juce_dsp/processors/juce_DryWetMixer.cpp index d87a5d2af5..01f29ec93a 100644 --- a/modules/juce_dsp/processors/juce_DryWetMixer.cpp +++ b/modules/juce_dsp/processors/juce_DryWetMixer.cpp @@ -208,7 +208,7 @@ template class DryWetMixer; //============================================================================== #if JUCE_UNIT_TESTS -struct DryWetMixerTests : public UnitTest +struct DryWetMixerTests final : public UnitTest { DryWetMixerTests() : UnitTest ("DryWetMixer", UnitTestCategories::dsp) {} diff --git a/modules/juce_dsp/processors/juce_FIRFilter_test.cpp b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp index 0f264de307..892040a504 100644 --- a/modules/juce_dsp/processors/juce_FIRFilter_test.cpp +++ b/modules/juce_dsp/processors/juce_FIRFilter_test.cpp @@ -26,7 +26,7 @@ namespace juce::dsp { -class FIRFilterTest : public UnitTest +class FIRFilterTest final : public UnitTest { template struct Helpers diff --git a/modules/juce_dsp/processors/juce_Oversampling.cpp b/modules/juce_dsp/processors/juce_Oversampling.cpp index 7c8b587466..59ad753921 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.cpp +++ b/modules/juce_dsp/processors/juce_Oversampling.cpp @@ -68,7 +68,7 @@ struct Oversampling::OversamplingStage signal, which could be equivalent to a "one time" oversampling processing. */ template -struct OversamplingDummy : public Oversampling::OversamplingStage +struct OversamplingDummy final : public Oversampling::OversamplingStage { using ParentType = typename Oversampling::OversamplingStage; @@ -108,7 +108,7 @@ struct OversamplingDummy : public Oversampling::OversamplingStage leading to specific processing optimizations. */ template -struct Oversampling2TimesEquirippleFIR : public Oversampling::OversamplingStage +struct Oversampling2TimesEquirippleFIR final : public Oversampling::OversamplingStage { using ParentType = typename Oversampling::OversamplingStage; @@ -260,7 +260,7 @@ private: phase, and provided with a method to get the exact resulting latency. */ template -struct Oversampling2TimesPolyphaseIIR : public Oversampling::OversamplingStage +struct Oversampling2TimesPolyphaseIIR final : public Oversampling::OversamplingStage { using ParentType = typename Oversampling::OversamplingStage; diff --git a/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp index 5da32ffa41..50c4445c31 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp +++ b/modules/juce_dsp/processors/juce_ProcessorChain_test.cpp @@ -26,7 +26,7 @@ namespace juce::dsp { -class ProcessorChainTest : public UnitTest +class ProcessorChainTest final : public UnitTest { template struct MockProcessor diff --git a/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp b/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp index d42d9e024a..40cc12fec2 100644 --- a/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp +++ b/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp @@ -23,7 +23,7 @@ namespace juce { -class ActionBroadcaster::ActionMessage : public MessageManager::MessageBase +class ActionBroadcaster::ActionMessage final : public MessageManager::MessageBase { public: ActionMessage (const ActionBroadcaster* ab, diff --git a/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp b/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp index aff0a27633..e11ccb5642 100644 --- a/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp +++ b/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp @@ -23,7 +23,7 @@ namespace juce { -class AsyncUpdater::AsyncUpdaterMessage : public CallbackMessage +class AsyncUpdater::AsyncUpdaterMessage final : public CallbackMessage { public: AsyncUpdaterMessage (AsyncUpdater& au) : owner (au) {} diff --git a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp index dce744f392..95a6b06630 100644 --- a/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp +++ b/modules/juce_events/interprocess/juce_ConnectedChildProcess.cpp @@ -43,8 +43,8 @@ static String getCommandLinePrefix (const String& commandLineUniqueID) //============================================================================== // This thread sends and receives ping messages every second, so that it // can find out if the other process has stopped running. -struct ChildProcessPingThread : public Thread, - private AsyncUpdater +struct ChildProcessPingThread : public Thread, + private AsyncUpdater { ChildProcessPingThread (int timeout) : Thread ("IPC ping"), timeoutMs (timeout) { @@ -86,8 +86,8 @@ private: }; //============================================================================== -struct ChildProcessCoordinator::Connection : public InterprocessConnection, - private ChildProcessPingThread +struct ChildProcessCoordinator::Connection final : public InterprocessConnection, + private ChildProcessPingThread { Connection (ChildProcessCoordinator& m, const String& pipeName, int timeout) : InterprocessConnection (false, magicCoordWorkerConnectionHeader), @@ -196,8 +196,8 @@ void ChildProcessCoordinator::killWorkerProcess() } //============================================================================== -struct ChildProcessWorker::Connection : public InterprocessConnection, - private ChildProcessPingThread +struct ChildProcessWorker::Connection final : public InterprocessConnection, + private ChildProcessPingThread { Connection (ChildProcessWorker& p, const String& pipeName, int timeout) : InterprocessConnection (false, magicCoordWorkerConnectionHeader), diff --git a/modules/juce_events/interprocess/juce_InterprocessConnection.cpp b/modules/juce_events/interprocess/juce_InterprocessConnection.cpp index 2b8d55bfc3..707aa26408 100644 --- a/modules/juce_events/interprocess/juce_InterprocessConnection.cpp +++ b/modules/juce_events/interprocess/juce_InterprocessConnection.cpp @@ -23,7 +23,7 @@ namespace juce { -struct InterprocessConnection::ConnectionThread : public Thread +struct InterprocessConnection::ConnectionThread final : public Thread { ConnectionThread (InterprocessConnection& c) : Thread ("JUCE IPC"), owner (c) {} void run() override { owner.runThread(); } @@ -65,7 +65,7 @@ private: bool safe = false; }; -class InterprocessConnection::SafeAction : public SafeActionImpl +class InterprocessConnection::SafeAction final : public SafeActionImpl { using SafeActionImpl::SafeActionImpl; }; @@ -246,7 +246,7 @@ void InterprocessConnection::initialiseWithPipe (std::unique_ptr newP } //============================================================================== -struct ConnectionStateMessage : public MessageManager::MessageBase +struct ConnectionStateMessage final : public MessageManager::MessageBase { ConnectionStateMessage (std::shared_ptr ipc, bool connected) noexcept : safeAction (ipc), connectionMade (connected) @@ -295,7 +295,7 @@ void InterprocessConnection::connectionLostInt() } } -struct DataDeliveryMessage : public Message +struct DataDeliveryMessage final : public Message { DataDeliveryMessage (std::shared_ptr ipc, const MemoryBlock& d) : safeAction (ipc), data (d) diff --git a/modules/juce_events/messages/juce_ApplicationBase.cpp b/modules/juce_events/messages/juce_ApplicationBase.cpp index 59d807ea5f..8296ddeffb 100644 --- a/modules/juce_events/messages/juce_ApplicationBase.cpp +++ b/modules/juce_events/messages/juce_ApplicationBase.cpp @@ -91,7 +91,7 @@ void JUCEApplicationBase::sendUnhandledException (const std::exception* const e, #endif #if JUCE_HANDLE_MULTIPLE_INSTANCES -struct JUCEApplicationBase::MultipleInstanceHandler : public ActionListener +struct JUCEApplicationBase::MultipleInstanceHandler final : public ActionListener { MultipleInstanceHandler (const String& appName) : appLock ("juceAppLock_" + appName) diff --git a/modules/juce_events/messages/juce_MessageManager.cpp b/modules/juce_events/messages/juce_MessageManager.cpp index ca9a48cc67..2c60c28e51 100644 --- a/modules/juce_events/messages/juce_MessageManager.cpp +++ b/modules/juce_events/messages/juce_MessageManager.cpp @@ -87,7 +87,7 @@ namespace detail bool dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages); } // namespace detail -class MessageManager::QuitMessage : public MessageManager::MessageBase +class MessageManager::QuitMessage final : public MessageManager::MessageBase { public: QuitMessage() {} @@ -149,7 +149,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) #endif //============================================================================== -class AsyncFunctionCallback : public MessageManager::MessageBase +class AsyncFunctionCallback final : public MessageManager::MessageBase { public: AsyncFunctionCallback (MessageCallbackFunction* const f, void* const param) @@ -194,7 +194,7 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func bool MessageManager::callAsync (std::function fn) { - struct AsyncCallInvoker : public MessageBase + struct AsyncCallInvoker final : public MessageBase { AsyncCallInvoker (std::function f) : callback (std::move (f)) {} void messageCallback() override { callback(); } @@ -282,7 +282,7 @@ bool MessageManager::existsAndIsCurrentThread() noexcept accessed from another thread inside a MM lock, you're screwed. (this is exactly what happens in Cocoa). */ -struct MessageManager::Lock::BlockingMessage : public MessageManager::MessageBase +struct MessageManager::Lock::BlockingMessage final : public MessageManager::MessageBase { explicit BlockingMessage (const MessageManager::Lock* parent) noexcept : owner (parent) {} diff --git a/modules/juce_events/native/juce_MessageManager_mac.mm b/modules/juce_events/native/juce_MessageManager_mac.mm index e54f98a578..3378f01b5d 100644 --- a/modules/juce_events/native/juce_MessageManager_mac.mm +++ b/modules/juce_events/native/juce_MessageManager_mac.mm @@ -33,7 +33,7 @@ using MenuTrackingChangedCallback = void (*)(bool); MenuTrackingChangedCallback menuTrackingChangedCallback = nullptr; //============================================================================== -struct AppDelegateClass : public ObjCClass +struct AppDelegateClass final : public ObjCClass { AppDelegateClass() : ObjCClass ("JUCEAppDelegate_") { @@ -353,7 +353,7 @@ void MessageManager::stopDispatchLoop() } else { - struct QuitCallback : public CallbackMessage + struct QuitCallback final : public CallbackMessage { QuitCallback() {} void messageCallback() override { MessageManager::getInstance()->stopDispatchLoop(); } @@ -463,7 +463,7 @@ private: MountedVolumeListChangeDetector& owner; id delegate; - struct ObserverClass : public ObjCClass + struct ObserverClass final : public ObjCClass { ObserverClass() : ObjCClass ("JUCEDriveObserver_") { diff --git a/modules/juce_events/native/juce_Messaging_android.cpp b/modules/juce_events/native/juce_Messaging_android.cpp index 7cf749f95e..8062840f28 100644 --- a/modules/juce_events/native/juce_Messaging_android.cpp +++ b/modules/juce_events/native/juce_Messaging_android.cpp @@ -26,7 +26,7 @@ namespace juce //============================================================================== namespace Android { - class Runnable : public juce::AndroidInterfaceImplementer + class Runnable : public juce::AndroidInterfaceImplementer { public: virtual void run() = 0; @@ -67,7 +67,7 @@ namespace Android } //============================================================================== -struct AndroidMessageQueue : private Android::Runnable +struct AndroidMessageQueue final : private Android::Runnable { JUCE_DECLARE_SINGLETON_SINGLETHREADED (AndroidMessageQueue, true) @@ -134,7 +134,7 @@ void MessageManager::runDispatchLoop() void MessageManager::stopDispatchLoop() { - struct QuitCallback : public CallbackMessage + struct QuitCallback final : public CallbackMessage { QuitCallback() {} @@ -169,7 +169,7 @@ void MessageManager::stopDispatchLoop() } //============================================================================== -class JuceAppLifecycle : public ActivityLifecycleCallbacks +class JuceAppLifecycle final : public ActivityLifecycleCallbacks { public: JuceAppLifecycle (juce::JUCEApplicationBase* (*initSymbolAddr)()) diff --git a/modules/juce_events/native/juce_Messaging_windows.cpp b/modules/juce_events/native/juce_Messaging_windows.cpp index aeccc2509d..a17d6dc89d 100644 --- a/modules/juce_events/native/juce_Messaging_windows.cpp +++ b/modules/juce_events/native/juce_Messaging_windows.cpp @@ -199,7 +199,7 @@ private: { if (data != nullptr && data->dwData == broadcastMessageMagicNumber) { - struct BroadcastMessage : public CallbackMessage + struct BroadcastMessage final : public CallbackMessage { BroadcastMessage (CharPointer_UTF32 text, size_t length) : message (text, length) {} void messageCallback() override { MessageManager::getInstance()->deliverBroadcastMessage (message); } diff --git a/modules/juce_events/timers/juce_MultiTimer.cpp b/modules/juce_events/timers/juce_MultiTimer.cpp index 48e5c65a2a..e546eb6080 100644 --- a/modules/juce_events/timers/juce_MultiTimer.cpp +++ b/modules/juce_events/timers/juce_MultiTimer.cpp @@ -23,7 +23,7 @@ namespace juce { -struct MultiTimerCallback : public Timer +struct MultiTimerCallback final : public Timer { MultiTimerCallback (const int tid, MultiTimer& mt) noexcept : owner (mt), timerID (tid) diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index 2dde51bc11..79cec02508 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -23,9 +23,9 @@ namespace juce { -class Timer::TimerThread : private Thread, - private DeletedAtShutdown, - private AsyncUpdater +class Timer::TimerThread final : private Thread, + private DeletedAtShutdown, + private AsyncUpdater { public: using LockType = CriticalSection; // (mysteriously, using a SpinLock here causes problems on some XP machines..) @@ -171,7 +171,7 @@ private: WaitableEvent callbackArrived; - struct CallTimersMessage : public MessageManager::MessageBase + struct CallTimersMessage final : public MessageManager::MessageBase { CallTimersMessage() {} @@ -371,7 +371,7 @@ void JUCE_CALLTYPE Timer::callPendingTimersSynchronously() TimerThread::instance->callTimersSynchronously(); } -struct LambdaInvoker : private Timer +struct LambdaInvoker final : private Timer { LambdaInvoker (int milliseconds, std::function f) : function (f) { diff --git a/modules/juce_graphics/colour/juce_Colour.cpp b/modules/juce_graphics/colour/juce_Colour.cpp index 47c343ec3c..82a2645552 100644 --- a/modules/juce_graphics/colour/juce_Colour.cpp +++ b/modules/juce_graphics/colour/juce_Colour.cpp @@ -562,7 +562,7 @@ String Colour::toDisplayString (const bool includeAlphaValue) const //============================================================================== #if JUCE_UNIT_TESTS -class ColourTests : public UnitTest +class ColourTests final : public UnitTest { public: ColourTests() diff --git a/modules/juce_graphics/fonts/juce_Font.cpp b/modules/juce_graphics/fonts/juce_Font.cpp index e5a561f9f6..d510e08384 100644 --- a/modules/juce_graphics/fonts/juce_Font.cpp +++ b/modules/juce_graphics/fonts/juce_Font.cpp @@ -46,7 +46,7 @@ float Font::getDefaultMinimumHorizontalScaleFactor() noexcept { r void Font::setDefaultMinimumHorizontalScaleFactor (float newValue) noexcept { FontValues::minimumHorizontalScale = newValue; } //============================================================================== -class TypefaceCache : private DeletedAtShutdown +class TypefaceCache final : private DeletedAtShutdown { public: TypefaceCache() diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index ddc55c291e..c4d475e801 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -245,7 +245,7 @@ float AffineTransform::getScaleFactor() const noexcept //============================================================================== #if JUCE_UNIT_TESTS -class AffineTransformTests : public UnitTest +class AffineTransformTests final : public UnitTest { public: AffineTransformTests() diff --git a/modules/juce_graphics/geometry/juce_Rectangle_test.cpp b/modules/juce_graphics/geometry/juce_Rectangle_test.cpp index 0ac97aeec0..3fd8f4b35f 100644 --- a/modules/juce_graphics/geometry/juce_Rectangle_test.cpp +++ b/modules/juce_graphics/geometry/juce_Rectangle_test.cpp @@ -26,7 +26,7 @@ namespace juce { -struct RectangleUnitTest : public UnitTest +struct RectangleUnitTest final : public UnitTest { RectangleUnitTest() : UnitTest ("Rectangle", UnitTestCategories::graphics) {} diff --git a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp index 00f0251dd6..e68d18d625 100644 --- a/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_JPEGLoader.cpp @@ -179,7 +179,7 @@ namespace JPEGHelpers //============================================================================== const int jpegBufferSize = 512; - struct JuceJpegDest : public jpeg_destination_mgr + struct JuceJpegDest final : public jpeg_destination_mgr { OutputStream* output; char* buffer; diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index e054ad5511..38f72e4432 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -78,7 +78,7 @@ Image ImageType::convert (const Image& source) const } //============================================================================== -class SoftwarePixelData : public ImagePixelData +class SoftwarePixelData final : public ImagePixelData { public: SoftwarePixelData (Image::PixelFormat formatToUse, int w, int h, bool clearImage) @@ -154,7 +154,7 @@ ImagePixelData::Ptr NativeImageType::create (Image::PixelFormat format, int widt #endif //============================================================================== -class SubsectionPixelData : public ImagePixelData +class SubsectionPixelData final : public ImagePixelData { public: SubsectionPixelData (ImagePixelData::Ptr source, Rectangle r) diff --git a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm index b21c986ed2..b37f47e847 100644 --- a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm +++ b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm @@ -30,7 +30,7 @@ namespace juce // This class has been renamed from CoreGraphicsImage to avoid a symbol // collision in Pro Tools 2019.12 and possibly 2020 depending on the Pro Tools // release schedule. -class CoreGraphicsPixelData : public ImagePixelData +class CoreGraphicsPixelData final : public ImagePixelData { public: CoreGraphicsPixelData (const Image::PixelFormat format, int w, int h, bool clearImage) @@ -140,7 +140,7 @@ public: detail::ContextPtr context; detail::ImagePtr cachedImageRef; - struct ImageDataContainer : public ReferenceCountedObject + struct ImageDataContainer final : public ReferenceCountedObject { ImageDataContainer() = default; @@ -813,7 +813,7 @@ void CoreGraphicsContext::applyTransform (const AffineTransform& transform) cons #if USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER Image juce_loadWithCoreImage (InputStream& input) { - struct MemoryBlockHolder : public ReferenceCountedObject + struct MemoryBlockHolder final : public ReferenceCountedObject { using Ptr = ReferenceCountedObjectPtr; MemoryBlock block; diff --git a/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp b/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp index 423e038776..8bf399d12d 100644 --- a/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp +++ b/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp @@ -29,7 +29,7 @@ namespace juce #if JUCE_USE_DIRECTWRITE namespace DirectWriteTypeLayout { - class CustomDirectWriteTextRenderer : public ComBaseClassHelper + class CustomDirectWriteTextRenderer final : public ComBaseClassHelper { public: CustomDirectWriteTextRenderer (IDWriteFontCollection& fonts, const AttributedString& as) diff --git a/modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp b/modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp index 9e10124da4..6c7dbe5585 100644 --- a/modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp +++ b/modules/juce_graphics/native/juce_DirectWriteTypeface_windows.cpp @@ -142,7 +142,7 @@ private: }; //============================================================================== -class WindowsDirectWriteTypeface : public Typeface +class WindowsDirectWriteTypeface final : public Typeface { public: WindowsDirectWriteTypeface (const Font& font, IDWriteFontCollection* fontCollection) @@ -285,7 +285,7 @@ private: AffineTransform pathTransform; BOOL fontFound = false; - struct PathGeometrySink : public ComBaseClassHelper + struct PathGeometrySink final : public ComBaseClassHelper { PathGeometrySink() : ComBaseClassHelper (0) {} diff --git a/modules/juce_graphics/native/juce_Fonts_android.cpp b/modules/juce_graphics/native/juce_Fonts_android.cpp index 2784728d55..48ca286c45 100644 --- a/modules/juce_graphics/native/juce_Fonts_android.cpp +++ b/modules/juce_graphics/native/juce_Fonts_android.cpp @@ -151,7 +151,7 @@ const float referenceFontSize = 256.0f; const float referenceFontToUnits = 1.0f / referenceFontSize; //============================================================================== -class AndroidTypeface : public Typeface +class AndroidTypeface final : public Typeface { public: AndroidTypeface (const Font& font) diff --git a/modules/juce_graphics/native/juce_Fonts_freetype.cpp b/modules/juce_graphics/native/juce_Fonts_freetype.cpp index 9c4a3cc249..f12e3af304 100644 --- a/modules/juce_graphics/native/juce_Fonts_freetype.cpp +++ b/modules/juce_graphics/native/juce_Fonts_freetype.cpp @@ -26,7 +26,7 @@ namespace juce { -struct FTLibWrapper : public ReferenceCountedObject +struct FTLibWrapper final : public ReferenceCountedObject { FTLibWrapper() { @@ -51,7 +51,7 @@ struct FTLibWrapper : public ReferenceCountedObject }; //============================================================================== -struct FTFaceWrapper : public ReferenceCountedObject +struct FTFaceWrapper final : public ReferenceCountedObject { FTFaceWrapper (const FTLibWrapper::Ptr& ftLib, const File& file, int faceIndex) : library (ftLib) @@ -84,7 +84,7 @@ struct FTFaceWrapper : public ReferenceCountedObject }; //============================================================================== -class FTTypefaceList : private DeletedAtShutdown +class FTTypefaceList final : private DeletedAtShutdown { public: FTTypefaceList() : library (new FTLibWrapper()) @@ -308,7 +308,7 @@ JUCE_IMPLEMENT_SINGLETON (FTTypefaceList) //============================================================================== -class FreeTypeTypeface : public CustomTypeface +class FreeTypeTypeface final : public CustomTypeface { public: FreeTypeTypeface (const Font& font) diff --git a/modules/juce_graphics/native/juce_Fonts_mac.mm b/modules/juce_graphics/native/juce_Fonts_mac.mm index 5fa2f0e965..b844bbac01 100644 --- a/modules/juce_graphics/native/juce_Fonts_mac.mm +++ b/modules/juce_graphics/native/juce_Fonts_mac.mm @@ -585,7 +585,7 @@ namespace CoreTextTypeLayout //============================================================================== -class OSXTypeface : public Typeface +class OSXTypeface final : public Typeface { public: OSXTypeface (const Font& font) diff --git a/modules/juce_graphics/native/juce_Fonts_windows.cpp b/modules/juce_graphics/native/juce_Fonts_windows.cpp index 005061efb4..5691d8dd73 100644 --- a/modules/juce_graphics/native/juce_Fonts_windows.cpp +++ b/modules/juce_graphics/native/juce_Fonts_windows.cpp @@ -313,7 +313,7 @@ Typeface::Ptr Font::getDefaultTypefaceForFont (const Font& font) } //============================================================================== -class WindowsTypeface : public Typeface +class WindowsTypeface final : public Typeface { public: WindowsTypeface (const Font& font) : Typeface (font.getTypefaceName(), diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index 1d5e55c978..02818c511d 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -26,10 +26,10 @@ namespace juce { -struct Button::CallbackHelper : public Timer, - public ApplicationCommandManagerListener, - public Value::Listener, - public KeyListener +struct Button::CallbackHelper final : public Timer, + public ApplicationCommandManagerListener, + public Value::Listener, + public KeyListener { CallbackHelper (Button& b) : button (b) {} diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp b/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp index ce51d068e1..fe5af8b10f 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp @@ -26,7 +26,7 @@ namespace juce { -class ApplicationCommandTarget::CommandMessage : public MessageManager::MessageBase +class ApplicationCommandTarget::CommandMessage final : public MessageManager::MessageBase { public: CommandMessage (ApplicationCommandTarget* const target, const InvocationInfo& inf) diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index e3587f780b..865d6408f2 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -496,7 +496,7 @@ bool Component::isOpaque() const noexcept } //============================================================================== -struct StandardCachedComponentImage : public CachedComponentImage +struct StandardCachedComponentImage final : public CachedComponentImage { StandardCachedComponentImage (Component& c) noexcept : owner (c) {} diff --git a/modules/juce_gui_basics/components/juce_FocusTraverser.cpp b/modules/juce_gui_basics/components/juce_FocusTraverser.cpp index 34e5093687..19fe062019 100644 --- a/modules/juce_gui_basics/components/juce_FocusTraverser.cpp +++ b/modules/juce_gui_basics/components/juce_FocusTraverser.cpp @@ -77,7 +77,7 @@ std::vector FocusTraverser::getAllComponents (Component* parentCompo //============================================================================== #if JUCE_UNIT_TESTS -struct FocusTraverserTests : public UnitTest +struct FocusTraverserTests final : public UnitTest { FocusTraverserTests() : UnitTest ("FocusTraverser", UnitTestCategories::gui) @@ -207,7 +207,7 @@ struct FocusTraverserTests : public UnitTest } private: - struct TestComponent : public Component + struct TestComponent final : public Component { TestComponent() { diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp index c085568600..e8ecfec5fc 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp @@ -26,7 +26,7 @@ namespace juce { -struct ModalComponentManager::ModalItem : public ComponentMovementWatcher +struct ModalComponentManager::ModalItem final : public ComponentMovementWatcher { ModalItem (Component* comp, bool shouldAutoDelete) : ComponentMovementWatcher (comp), diff --git a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp index 2dd060e9fd..2fc5117aa7 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableText.cpp +++ b/modules/juce_gui_basics/drawables/juce_DrawableText.cpp @@ -211,7 +211,7 @@ bool DrawableText::replaceColour (Colour originalColour, Colour replacementColou //============================================================================== std::unique_ptr DrawableText::createAccessibilityHandler() { - class DrawableTextAccessibilityHandler : public AccessibilityHandler + class DrawableTextAccessibilityHandler final : public AccessibilityHandler { public: DrawableTextAccessibilityHandler (DrawableText& drawableTextToWrap) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp index 00b111f093..c017707716 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp @@ -27,8 +27,8 @@ namespace juce { //============================================================================== -class FileChooser::NonNative : public std::enable_shared_from_this, - public FileChooser::Pimpl +class FileChooser::NonNative final : public std::enable_shared_from_this, + public FileChooser::Pimpl { public: NonNative (FileChooser& fileChooser, int flags, FilePreviewComponent* preview) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp index 4342fa51ac..e0db0c3af1 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp @@ -26,7 +26,7 @@ namespace juce { -class FileChooserDialogBox::ContentComponent : public Component +class FileChooserDialogBox::ContentComponent final : public Component { public: ContentComponent (const String& name, const String& desc, FileBrowserComponent& chooser) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp index 853ef484c0..b56fd5aae4 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.cpp @@ -99,10 +99,10 @@ void FileListComponent::changeListenerCallback (ChangeBroadcaster*) } //============================================================================== -class FileListComponent::ItemComponent : public Component, - public TooltipClient, - private TimeSliceClient, - private AsyncUpdater +class FileListComponent::ItemComponent final : public Component, + public TooltipClient, + private TimeSliceClient, + private AsyncUpdater { public: ItemComponent (FileListComponent& fc, TimeSliceThread& t) diff --git a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp index 3ebc44c686..0d620681d5 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp @@ -77,9 +77,9 @@ constexpr int threeWayCompare (const std::tuple& a, const std::tuple KeyboardFocusTraverser::getAllComponents (Component* par //============================================================================== #if JUCE_UNIT_TESTS -struct KeyboardFocusTraverserTests : public UnitTest +struct KeyboardFocusTraverserTests final : public UnitTest { KeyboardFocusTraverserTests() : UnitTest ("KeyboardFocusTraverser", UnitTestCategories::gui) @@ -253,7 +253,7 @@ struct KeyboardFocusTraverserTests : public UnitTest } private: - struct TestComponent : public Component + struct TestComponent final : public Component { TestComponent() { diff --git a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp index c6a780bea5..c7d87742f5 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp @@ -146,7 +146,7 @@ public: } //============================================================================== - struct ProxyComponent : public Component + struct ProxyComponent final : public Component { ProxyComponent (Component& c) { diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp index e47f982a91..a0b3f85326 100644 --- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp @@ -212,7 +212,7 @@ private: }; //============================================================================== -class ConcertinaPanel::PanelHolder : public Component +class ConcertinaPanel::PanelHolder final : public Component { public: PanelHolder (Component* comp, bool takeOwnership) diff --git a/modules/juce_gui_basics/layout/juce_FlexBox.cpp b/modules/juce_gui_basics/layout/juce_FlexBox.cpp index ed5443b68f..409be26c0b 100644 --- a/modules/juce_gui_basics/layout/juce_FlexBox.cpp +++ b/modules/juce_gui_basics/layout/juce_FlexBox.cpp @@ -842,7 +842,7 @@ FlexItem FlexItem::withAlignSelf (AlignSelf a) const noexcept { auto fi = //============================================================================== #if JUCE_UNIT_TESTS -class FlexBoxTests : public UnitTest +class FlexBoxTests final : public UnitTest { public: FlexBoxTests() : UnitTest ("FlexBox", UnitTestCategories::gui) {} diff --git a/modules/juce_gui_basics/layout/juce_Grid.cpp b/modules/juce_gui_basics/layout/juce_Grid.cpp index d271ba719f..df9cb62af3 100644 --- a/modules/juce_gui_basics/layout/juce_Grid.cpp +++ b/modules/juce_gui_basics/layout/juce_Grid.cpp @@ -1158,7 +1158,7 @@ void Grid::performLayout (Rectangle targetArea) //============================================================================== #if JUCE_UNIT_TESTS -struct GridTests : public UnitTest +struct GridTests final : public UnitTest { GridTests() : UnitTest ("Grid", UnitTestCategories::gui) diff --git a/modules/juce_gui_basics/layout/juce_ScrollBar.cpp b/modules/juce_gui_basics/layout/juce_ScrollBar.cpp index 4d5052bd0f..d663552fd7 100644 --- a/modules/juce_gui_basics/layout/juce_ScrollBar.cpp +++ b/modules/juce_gui_basics/layout/juce_ScrollBar.cpp @@ -26,7 +26,7 @@ namespace juce { -class ScrollBar::ScrollbarButton : public Button +class ScrollBar::ScrollbarButton final : public Button { public: ScrollbarButton (int direc, ScrollBar& s) @@ -443,7 +443,7 @@ bool ScrollBar::getVisibility() const noexcept //============================================================================== std::unique_ptr ScrollBar::createAccessibilityHandler() { - class ValueInterface : public AccessibilityRangedNumericValueInterface + class ValueInterface final : public AccessibilityRangedNumericValueInterface { public: explicit ValueInterface (ScrollBar& scrollBarToWrap) : scrollBar (scrollBarToWrap) {} diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp index 17bb1eccb1..23390268e5 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp @@ -171,7 +171,7 @@ void TabBarButton::resized() } //============================================================================== -class TabbedButtonBar::BehindFrontTabComp : public Component +class TabbedButtonBar::BehindFrontTabComp final : public Component { public: BehindFrontTabComp (TabbedButtonBar& tb) : owner (tb) diff --git a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp index b19bc3d309..d4caa60f02 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedComponent.cpp @@ -53,7 +53,7 @@ namespace TabbedComponentHelpers } //============================================================================== -struct TabbedComponent::ButtonBar : public TabbedButtonBar +struct TabbedComponent::ButtonBar final : public TabbedButtonBar { ButtonBar (TabbedComponent& tabComp, TabbedButtonBar::Orientation o) : TabbedButtonBar (o), owner (tabComp) diff --git a/modules/juce_gui_basics/layout/juce_Viewport.cpp b/modules/juce_gui_basics/layout/juce_Viewport.cpp index 0abbc4f1a6..f18da2210e 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -28,8 +28,8 @@ namespace juce using ViewportDragPosition = AnimatedPosition; -struct Viewport::DragToScrollListener : private MouseListener, - private ViewportDragPosition::Listener +struct Viewport::DragToScrollListener final : private MouseListener, + private ViewportDragPosition::Listener { DragToScrollListener (Viewport& v) : viewport (v) { diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 41d7db3871..c44236fb53 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -1591,7 +1591,7 @@ Button* LookAndFeel_V2::createSliderButton (Slider&, const bool isIncrement) return new TextButton (isIncrement ? "+" : "-", String()); } -class LookAndFeel_V2::SliderLabelComp : public Label +class LookAndFeel_V2::SliderLabelComp final : public Label { public: SliderLabelComp() : Label ({}, {}) {} @@ -1912,7 +1912,7 @@ void LookAndFeel_V2::drawDocumentWindowTitleBar (DocumentWindow& window, Graphic } //============================================================================== -class LookAndFeel_V2::GlassWindowButton : public Button +class LookAndFeel_V2::GlassWindowButton final : public Button { public: GlassWindowButton (const String& name, Colour col, @@ -2062,7 +2062,7 @@ std::unique_ptr LookAndFeel_V2::createDropShadowerForComponent (Co std::unique_ptr LookAndFeel_V2::createFocusOutlineForComponent (Component&) { - struct WindowProperties : public FocusOutline::OutlineWindowProperties + struct WindowProperties final : public FocusOutline::OutlineWindowProperties { Rectangle getOutlineBounds (Component& c) override { diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp index 677a3d9939..75375f47af 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp @@ -533,7 +533,7 @@ void LookAndFeel_V3::drawKeymapChangeButton (Graphics& g, int width, int height, } -class LookAndFeel_V3_DocumentWindowButton : public Button +class LookAndFeel_V3_DocumentWindowButton final : public Button { public: LookAndFeel_V3_DocumentWindowButton (const String& name, Colour c, const Path& normal, const Path& toggled) diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp index f6accad940..d005ca6a54 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp @@ -106,7 +106,7 @@ LookAndFeel_V4::ColourScheme LookAndFeel_V4::getLightColourScheme() } //============================================================================== -class LookAndFeel_V4_DocumentWindowButton : public Button +class LookAndFeel_V4_DocumentWindowButton final : public Button { public: LookAndFeel_V4_DocumentWindowButton (const String& name, Colour c, const Path& normal, const Path& toggled) diff --git a/modules/juce_gui_basics/menus/juce_BurgerMenuComponent.cpp b/modules/juce_gui_basics/menus/juce_BurgerMenuComponent.cpp index dc9f961a8a..d83ee0147f 100644 --- a/modules/juce_gui_basics/menus/juce_BurgerMenuComponent.cpp +++ b/modules/juce_gui_basics/menus/juce_BurgerMenuComponent.cpp @@ -27,7 +27,7 @@ namespace juce { //============================================================================== -struct CustomMenuBarItemHolder : public Component +struct CustomMenuBarItemHolder final : public Component { CustomMenuBarItemHolder (const ReferenceCountedObjectPtr& customComponent) { diff --git a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp index 328b46f7c5..b462bbaa27 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp +++ b/modules/juce_gui_basics/menus/juce_MenuBarComponent.cpp @@ -26,7 +26,7 @@ namespace juce { -class MenuBarComponent::AccessibleItemComponent : public Component +class MenuBarComponent::AccessibleItemComponent final : public Component { public: AccessibleItemComponent (MenuBarComponent& comp, const String& menuItemName) @@ -41,7 +41,7 @@ public: private: std::unique_ptr createAccessibilityHandler() override { - class ComponentHandler : public AccessibilityHandler + class ComponentHandler final : public AccessibilityHandler { public: explicit ComponentHandler (AccessibleItemComponent& item) @@ -447,7 +447,7 @@ void MenuBarComponent::timerCallback() //============================================================================== std::unique_ptr MenuBarComponent::createAccessibilityHandler() { - struct MenuBarComponentAccessibilityHandler : public AccessibilityHandler + struct MenuBarComponentAccessibilityHandler final : public AccessibilityHandler { explicit MenuBarComponentAccessibilityHandler (MenuBarComponent& menuBarComponent) : AccessibilityHandler (menuBarComponent, AccessibilityRole::menuBar) diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 952608e765..c38ee12669 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -57,7 +57,7 @@ static bool hasActiveSubMenu (const PopupMenu::Item& item) noexcept } //============================================================================== -struct HeaderItemComponent : public PopupMenu::CustomComponent +struct HeaderItemComponent final : public PopupMenu::CustomComponent { HeaderItemComponent (const String& name, const Options& opts) : CustomComponent (false), options (opts) @@ -96,7 +96,7 @@ struct HeaderItemComponent : public PopupMenu::CustomComponent }; //============================================================================== -struct ItemComponent : public Component +struct ItemComponent final : public Component { ItemComponent (const PopupMenu::Item& i, const PopupMenu::Options& o, MenuWindow& parent) : item (i), parentWindow (parent), options (o), customComp (i.customComponent) @@ -188,7 +188,7 @@ struct ItemComponent : public Component private: //============================================================================== - class ItemAccessibilityHandler : public AccessibilityHandler + class ItemAccessibilityHandler final : public AccessibilityHandler { public: explicit ItemAccessibilityHandler (ItemComponent& itemComponentToWrap) @@ -322,7 +322,7 @@ private: }; //============================================================================== -struct MenuWindow : public Component +struct MenuWindow final : public Component { MenuWindow (const PopupMenu& menu, MenuWindow* parentWindow, @@ -1331,7 +1331,7 @@ struct MenuWindow : public Component }; //============================================================================== -class MouseSourceState : public Timer +class MouseSourceState final : public Timer { public: MouseSourceState (MenuWindow& w, MouseInputSource s) @@ -1574,7 +1574,7 @@ private: }; //============================================================================== -struct NormalComponentWrapper : public PopupMenu::CustomComponent +struct NormalComponentWrapper final : public PopupMenu::CustomComponent { NormalComponentWrapper (Component& comp, int w, int h, bool triggerMenuItemAutomaticallyWhenClicked) : PopupMenu::CustomComponent (triggerMenuItemAutomaticallyWhenClicked), @@ -2068,7 +2068,7 @@ Component* PopupMenu::createWindow (const Options& options, //============================================================================== // This invokes any command manager commands and deletes the menu window when it is dismissed -struct PopupMenuCompletionCallback : public ModalComponentManager::Callback +struct PopupMenuCompletionCallback final : public ModalComponentManager::Callback { PopupMenuCompletionCallback() = default; diff --git a/modules/juce_gui_basics/misc/juce_DropShadower.cpp b/modules/juce_gui_basics/misc/juce_DropShadower.cpp index d431a033bb..8e3de83be3 100644 --- a/modules/juce_gui_basics/misc/juce_DropShadower.cpp +++ b/modules/juce_gui_basics/misc/juce_DropShadower.cpp @@ -26,7 +26,7 @@ namespace juce { -class DropShadower::ShadowWindow : public Component +class DropShadower::ShadowWindow final : public Component { public: ShadowWindow (Component* comp, const DropShadow& ds) @@ -170,7 +170,7 @@ private: JUCE_DECLARE_WEAK_REFERENCEABLE (VirtualDesktopWatcher) }; -class DropShadower::ParentVisibilityChangedListener : public ComponentListener +class DropShadower::ParentVisibilityChangedListener final : public ComponentListener { public: ParentVisibilityChangedListener (Component& r, ComponentListener& l) diff --git a/modules/juce_gui_basics/misc/juce_FocusOutline.cpp b/modules/juce_gui_basics/misc/juce_FocusOutline.cpp index ad30f26581..a410a766f6 100644 --- a/modules/juce_gui_basics/misc/juce_FocusOutline.cpp +++ b/modules/juce_gui_basics/misc/juce_FocusOutline.cpp @@ -27,7 +27,7 @@ namespace juce { //============================================================================== -struct OutlineWindowComponent : public Component +struct OutlineWindowComponent final : public Component { OutlineWindowComponent (Component* c, FocusOutline::OutlineWindowProperties& p) : target (c), props (p) diff --git a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp index e4911ac1bc..45fbe2ac5e 100644 --- a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp +++ b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp @@ -31,8 +31,8 @@ bool juce_performDragDropText (const String&, bool& shouldStop); //============================================================================== -class DragAndDropContainer::DragImageComponent : public Component, - private Timer +class DragAndDropContainer::DragImageComponent final : public Component, + private Timer { public: DragImageComponent (const ScaledImage& im, diff --git a/modules/juce_gui_basics/native/accessibility/juce_Accessibility.cpp b/modules/juce_gui_basics/native/accessibility/juce_Accessibility.cpp index 19499c9495..8dc2801919 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_Accessibility.cpp +++ b/modules/juce_gui_basics/native/accessibility/juce_Accessibility.cpp @@ -27,7 +27,11 @@ namespace juce { #if ! JUCE_NATIVE_ACCESSIBILITY_INCLUDED - class AccessibilityHandler::AccessibilityNativeImpl { public: AccessibilityNativeImpl (AccessibilityHandler&) {} }; + class AccessibilityHandler::AccessibilityNativeImpl + { + public: + AccessibilityNativeImpl (AccessibilityHandler&) {} + }; #endif } // namespace juce diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp index 448bc14456..063f95cd6e 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp +++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityElement_windows.cpp @@ -31,8 +31,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token") int AccessibilityNativeHandle::idCounter = 0; //============================================================================== -class UIAScrollProvider : public UIAProviderBase, - public ComBaseClassHelper +class UIAScrollProvider final : public UIAProviderBase, + public ComBaseClassHelper { public: using UIAProviderBase::UIAProviderBase; @@ -50,8 +50,8 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIAScrollProvider) }; -class UIAScrollItemProvider : public UIAProviderBase, - public ComBaseClassHelper +class UIAScrollItemProvider final : public UIAProviderBase, + public ComBaseClassHelper { public: using UIAProviderBase::UIAProviderBase; diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm b/modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm index 456e3afe94..317bea954d 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm +++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilitySharedCode_mac.mm @@ -40,7 +40,7 @@ struct AccessibleObjCClassDeleter }; template -class AccessibleObjCClass : public ObjCClass +class AccessibleObjCClass : public ObjCClass { public: using Holder = std::unique_ptr; diff --git a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp index 1b527f1091..82d806d3b3 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp +++ b/modules/juce_gui_basics/native/accessibility/juce_AccessibilityTextHelpers_test.cpp @@ -26,7 +26,7 @@ namespace juce { -struct AccessibilityTextHelpersTest : public UnitTest +struct AccessibilityTextHelpersTest final : public UnitTest { AccessibilityTextHelpersTest() : UnitTest ("AccessibilityTextHelpers", UnitTestCategories::gui) {} @@ -125,7 +125,7 @@ struct AccessibilityTextHelpersTest : public UnitTest enum class CursorPosition { begin, end }; - class MockAccessibilityTextInterface : public AccessibilityTextInterface + class MockAccessibilityTextInterface final : public AccessibilityTextInterface { public: MockAccessibilityTextInterface (String stringIn, Range selectionIn, CursorPosition insertIn) diff --git a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_ios.mm b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_ios.mm index 3afb6325d9..a1ea456319 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_ios.mm +++ b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_ios.mm @@ -39,45 +39,45 @@ namespace juce #define JUCE_NATIVE_ACCESSIBILITY_INCLUDED 1 -template struct Signature; +template struct Signature {}; template struct Signature {}; // @selector isn't constexpr, so the 'sel' members are functions rather than static constexpr data members -struct SignatureHasText : Signature { static auto sel() { return @selector (hasText); } }; -struct SignatureSetSelectedTextRange : Signature { static auto sel() { return @selector (setSelectedTextRange:); } }; -struct SignatureSelectedTextRange : Signature { static auto sel() { return @selector (selectedTextRange); } }; -struct SignatureMarkedTextRange : Signature { static auto sel() { return @selector (markedTextRange); } }; -struct SignatureSetMarkedTextSelectedRange : Signature { static auto sel() { return @selector (setMarkedText:selectedRange:); } }; -struct SignatureUnmarkText : Signature { static auto sel() { return @selector (unmarkText); } }; -struct SignatureMarkedTextStyle : Signature*()> { static auto sel() { return @selector (markedTextStyle); } }; -struct SignatureSetMarkedTextStyle : Signature*)> { static auto sel() { return @selector (setMarkedTextStyle:); } }; -struct SignatureBeginningOfDocument : Signature { static auto sel() { return @selector (beginningOfDocument); } }; -struct SignatureEndOfDocument : Signature { static auto sel() { return @selector (endOfDocument); } }; -struct SignatureTokenizer : Signature()> { static auto sel() { return @selector (tokenizer); } }; -struct SignatureBaseWritingDirection : Signature { static auto sel() { return @selector (baseWritingDirectionForPosition:inDirection:); } }; -struct SignatureCaretRectForPosition : Signature { static auto sel() { return @selector (caretRectForPosition:); } }; -struct SignatureCharacterRangeByExtending : Signature { static auto sel() { return @selector (characterRangeByExtendingPosition:inDirection:); } }; -struct SignatureCharacterRangeAtPoint : Signature { static auto sel() { return @selector (characterRangeAtPoint:); } }; -struct SignatureClosestPositionToPoint : Signature { static auto sel() { return @selector (closestPositionToPoint:); } }; -struct SignatureClosestPositionToPointInRange : Signature { static auto sel() { return @selector (closestPositionToPoint:withinRange:); } }; -struct SignatureComparePositionToPosition : Signature { static auto sel() { return @selector (comparePosition:toPosition:); } }; -struct SignatureOffsetFromPositionToPosition : Signature { static auto sel() { return @selector (offsetFromPosition:toPosition:); } }; -struct SignaturePositionFromPositionInDirection : Signature { static auto sel() { return @selector (positionFromPosition:inDirection:offset:); } }; -struct SignaturePositionFromPositionOffset : Signature { static auto sel() { return @selector (positionFromPosition:offset:); } }; -struct SignatureFirstRectForRange : Signature { static auto sel() { return @selector (firstRectForRange:); } }; -struct SignatureSelectionRectsForRange : Signature* (UITextRange*)> { static auto sel() { return @selector (selectionRectsForRange:); } }; -struct SignaturePositionWithinRange : Signature { static auto sel() { return @selector (positionWithinRange:farthestInDirection:); } }; -struct SignatureReplaceRangeWithText : Signature { static auto sel() { return @selector (replaceRange:withText:); } }; -struct SignatureSetBaseWritingDirection : Signature { static auto sel() { return @selector (setBaseWritingDirection:forRange:); } }; -struct SignatureTextInRange : Signature { static auto sel() { return @selector (textInRange:); } }; -struct SignatureTextRangeFromPosition : Signature { static auto sel() { return @selector (textRangeFromPosition:toPosition:); } }; -struct SignatureSetInputDelegate : Signature { static auto sel() { return @selector (setInputDelegate:); } }; -struct SignatureInputDelegate : Signature { static auto sel() { return @selector (inputDelegate); } }; -struct SignatureKeyboardType : Signature { static auto sel() { return @selector (keyboardType); } }; -struct SignatureAutocapitalizationType : Signature { static auto sel() { return @selector (autocapitalizationType); } }; -struct SignatureAutocorrectionType : Signature { static auto sel() { return @selector (autocorrectionType); } }; +struct SignatureHasText final : public Signature { static auto sel() { return @selector (hasText); } }; +struct SignatureSetSelectedTextRange final : public Signature { static auto sel() { return @selector (setSelectedTextRange:); } }; +struct SignatureSelectedTextRange final : public Signature { static auto sel() { return @selector (selectedTextRange); } }; +struct SignatureMarkedTextRange final : public Signature { static auto sel() { return @selector (markedTextRange); } }; +struct SignatureSetMarkedTextSelectedRange final : public Signature { static auto sel() { return @selector (setMarkedText:selectedRange:); } }; +struct SignatureUnmarkText final : public Signature { static auto sel() { return @selector (unmarkText); } }; +struct SignatureMarkedTextStyle final : public Signature*()> { static auto sel() { return @selector (markedTextStyle); } }; +struct SignatureSetMarkedTextStyle final : public Signature*)> { static auto sel() { return @selector (setMarkedTextStyle:); } }; +struct SignatureBeginningOfDocument final : public Signature { static auto sel() { return @selector (beginningOfDocument); } }; +struct SignatureEndOfDocument final : public Signature { static auto sel() { return @selector (endOfDocument); } }; +struct SignatureTokenizer final : public Signature()> { static auto sel() { return @selector (tokenizer); } }; +struct SignatureBaseWritingDirection final : public Signature { static auto sel() { return @selector (baseWritingDirectionForPosition:inDirection:); } }; +struct SignatureCaretRectForPosition final : public Signature { static auto sel() { return @selector (caretRectForPosition:); } }; +struct SignatureCharacterRangeByExtending final : public Signature { static auto sel() { return @selector (characterRangeByExtendingPosition:inDirection:); } }; +struct SignatureCharacterRangeAtPoint final : public Signature { static auto sel() { return @selector (characterRangeAtPoint:); } }; +struct SignatureClosestPositionToPoint final : public Signature { static auto sel() { return @selector (closestPositionToPoint:); } }; +struct SignatureClosestPositionToPointInRange final : public Signature { static auto sel() { return @selector (closestPositionToPoint:withinRange:); } }; +struct SignatureComparePositionToPosition final : public Signature { static auto sel() { return @selector (comparePosition:toPosition:); } }; +struct SignatureOffsetFromPositionToPosition final : public Signature { static auto sel() { return @selector (offsetFromPosition:toPosition:); } }; +struct SignaturePositionFromPositionInDirection final : public Signature { static auto sel() { return @selector (positionFromPosition:inDirection:offset:); } }; +struct SignaturePositionFromPositionOffset final : public Signature { static auto sel() { return @selector (positionFromPosition:offset:); } }; +struct SignatureFirstRectForRange final : public Signature { static auto sel() { return @selector (firstRectForRange:); } }; +struct SignatureSelectionRectsForRange final : public Signature* (UITextRange*)> { static auto sel() { return @selector (selectionRectsForRange:); } }; +struct SignaturePositionWithinRange final : public Signature { static auto sel() { return @selector (positionWithinRange:farthestInDirection:); } }; +struct SignatureReplaceRangeWithText final : public Signature { static auto sel() { return @selector (replaceRange:withText:); } }; +struct SignatureSetBaseWritingDirection final : public Signature { static auto sel() { return @selector (setBaseWritingDirection:forRange:); } }; +struct SignatureTextInRange final : public Signature { static auto sel() { return @selector (textInRange:); } }; +struct SignatureTextRangeFromPosition final : public Signature { static auto sel() { return @selector (textRangeFromPosition:toPosition:); } }; +struct SignatureSetInputDelegate final : public Signature { static auto sel() { return @selector (setInputDelegate:); } }; +struct SignatureInputDelegate final : public Signature { static auto sel() { return @selector (inputDelegate); } }; +struct SignatureKeyboardType final : public Signature { static auto sel() { return @selector (keyboardType); } }; +struct SignatureAutocapitalizationType final : public Signature { static auto sel() { return @selector (autocapitalizationType); } }; +struct SignatureAutocorrectionType final : public Signature { static auto sel() { return @selector (autocorrectionType); } }; //============================================================================== class AccessibilityHandler::AccessibilityNativeImpl @@ -95,7 +95,7 @@ public: private: //============================================================================== - class AccessibilityContainer : public AccessibleObjCClass + class AccessibilityContainer final : public AccessibleObjCClass { public: AccessibilityContainer() @@ -212,7 +212,7 @@ private: }; //============================================================================== - class AccessibilityElement : public AccessibleObjCClass + class AccessibilityElement final : public AccessibleObjCClass { template static constexpr void forEach (Func&& func, Items&&... items) diff --git a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_mac.mm b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_mac.mm index ec2a6897a0..6a6c9f6c56 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_mac.mm +++ b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_mac.mm @@ -49,7 +49,7 @@ public: private: //============================================================================== - class API_AVAILABLE (macos (10.10)) AccessibilityElement : public AccessibleObjCClass> + class API_AVAILABLE (macos (10.10)) AccessibilityElement final : public AccessibleObjCClass> { public: static Holder create (AccessibilityHandler& handler) diff --git a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp index 7f02374874..708db632c9 100644 --- a/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp +++ b/modules/juce_gui_basics/native/accessibility/juce_Accessibility_windows.cpp @@ -242,7 +242,7 @@ void AccessibilityHandler::notifyAccessibilityEvent (AccessibilityEvent eventTyp sendAccessibilityAutomationEvent (*this, event); } -struct SpVoiceWrapper : public DeletedAtShutdown +struct SpVoiceWrapper final : public DeletedAtShutdown { SpVoiceWrapper() { diff --git a/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp b/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp index f7b50519fa..848e2f7c44 100644 --- a/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp +++ b/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp @@ -688,7 +688,7 @@ DECLARE_JNI_CLASS (AndroidReceiver, "com/rmsl/juce/Receiver") #undef JNI_CLASS_MEMBERS //============================================================================== -class AndroidContentSharerPrepareFilesTask : private AsyncUpdater +class AndroidContentSharerPrepareFilesTask final : private AsyncUpdater { public: AndroidContentSharerPrepareFilesTask (const Array& fileUrls, @@ -875,7 +875,7 @@ private: auto detail::ScopedContentSharerInterface::shareFiles (const Array& urls, Component*) -> std::unique_ptr { - class NativeScopedContentSharerInterface : public detail::ScopedContentSharerInterface + class NativeScopedContentSharerInterface final : public detail::ScopedContentSharerInterface { public: explicit NativeScopedContentSharerInterface (Array f) @@ -914,7 +914,7 @@ auto detail::ScopedContentSharerInterface::shareFiles (const Array& urls, C auto detail::ScopedContentSharerInterface::shareText (const String& text, Component*) -> std::unique_ptr { - class NativeScopedContentSharerInterface : public detail::ScopedContentSharerInterface + class NativeScopedContentSharerInterface final : public detail::ScopedContentSharerInterface { public: explicit NativeScopedContentSharerInterface (String t) diff --git a/modules/juce_gui_basics/native/juce_ContentSharer_ios.cpp b/modules/juce_gui_basics/native/juce_ContentSharer_ios.cpp index 2d11527fa4..822ae8944e 100644 --- a/modules/juce_gui_basics/native/juce_ContentSharer_ios.cpp +++ b/modules/juce_gui_basics/native/juce_ContentSharer_ios.cpp @@ -26,8 +26,8 @@ namespace juce { -class NativeScopedContentSharerInterface : public detail::ScopedContentSharerInterface, - public detail::NativeModalWrapperComponent +class NativeScopedContentSharerInterface final : public detail::ScopedContentSharerInterface, + public detail::NativeModalWrapperComponent { public: NativeScopedContentSharerInterface (Component* parentIn, NSUniquePtr itemsIn) diff --git a/modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp b/modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp index e636f99752..bf9154ce22 100644 --- a/modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp +++ b/modules/juce_gui_basics/native/juce_DragAndDrop_windows.cpp @@ -29,7 +29,7 @@ namespace juce namespace DragAndDropHelpers { //============================================================================== - struct JuceDropSource : public ComBaseClassHelper + struct JuceDropSource final : public ComBaseClassHelper { JuceDropSource() {} @@ -51,7 +51,7 @@ namespace DragAndDropHelpers }; //============================================================================== - struct JuceEnumFormatEtc : public ComBaseClassHelper + struct JuceEnumFormatEtc final : public ComBaseClassHelper { JuceEnumFormatEtc (const FORMATETC* f) : format (f) {} @@ -123,7 +123,7 @@ namespace DragAndDropHelpers }; //============================================================================== - class JuceDataObject : public ComBaseClassHelper + class JuceDataObject final : public ComBaseClassHelper { public: JuceDataObject (const FORMATETC* f, const STGMEDIUM* m) @@ -251,7 +251,7 @@ namespace DragAndDropHelpers return static_cast (hDrop.release()); } - struct DragAndDropJob : public ThreadPoolJob + struct DragAndDropJob final : public ThreadPoolJob { DragAndDropJob (FORMATETC f, STGMEDIUM m, DWORD d, std::function&& cb) : ThreadPoolJob ("DragAndDrop"), @@ -288,7 +288,7 @@ namespace DragAndDropHelpers std::function completionCallback; }; - class ThreadPoolHolder : private DeletedAtShutdown + class ThreadPoolHolder final : private DeletedAtShutdown { public: ThreadPoolHolder() = default; diff --git a/modules/juce_gui_basics/native/juce_FileChooser_android.cpp b/modules/juce_gui_basics/native/juce_FileChooser_android.cpp index c0fce10e40..41c9bda40a 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_android.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_android.cpp @@ -39,7 +39,7 @@ DECLARE_JNI_CLASS (ClipData, "android/content/ClipData") DECLARE_JNI_CLASS (ClipDataItem, "android/content/ClipData$Item") #undef JNI_CLASS_MEMBERS -class FileChooser::Native : public FileChooser::Pimpl +class FileChooser::Native final : public FileChooser::Pimpl { public: //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_FileChooser_ios.mm b/modules/juce_gui_basics/native/juce_FileChooser_ios.mm index 840551860e..e14579d1ff 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_ios.mm +++ b/modules/juce_gui_basics/native/juce_FileChooser_ios.mm @@ -40,10 +40,10 @@ namespace juce #endif //============================================================================== -class FileChooser::Native : public FileChooser::Pimpl, - public detail::NativeModalWrapperComponent, - public AsyncUpdater, - public std::enable_shared_from_this +class FileChooser::Native final : public FileChooser::Pimpl, + public detail::NativeModalWrapperComponent, + public AsyncUpdater, + public std::enable_shared_from_this { public: static std::shared_ptr make (FileChooser& fileChooser, int flags) diff --git a/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp b/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp index cddc3fc78a..c96ae01773 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp @@ -44,8 +44,8 @@ static bool isSet (int flags, int toCheck) return (flags & toCheck) != 0; } -class FileChooser::Native : public FileChooser::Pimpl, - private Timer +class FileChooser::Native final : public FileChooser::Pimpl, + private Timer { public: Native (FileChooser& fileChooser, int flags) diff --git a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm index 5dc5c941fd..5e43ab8e64 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm +++ b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm @@ -52,8 +52,8 @@ static NSMutableArray* createAllowedTypesArray (const StringArray& filters) } //============================================================================== -class FileChooser::Native : public Component, - public FileChooser::Pimpl +class FileChooser::Native final : public Component, + public FileChooser::Pimpl { public: Native (FileChooser& fileChooser, int flags, FilePreviewComponent* previewComponent) @@ -371,7 +371,7 @@ private: }; //============================================================================== - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCEFileChooser_") { diff --git a/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp b/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp index 3efa71e9ac..39dc6324ca 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp @@ -32,7 +32,7 @@ namespace detail bool dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages); } // namespace detail -class Win32NativeFileChooser : private Thread +class Win32NativeFileChooser final : private Thread { public: enum { charsAvailableForResult = 32768 }; @@ -124,7 +124,7 @@ public: private: //============================================================================== - class CustomComponentHolder : public Component + class CustomComponentHolder final : public Component { public: CustomComponentHolder (Component* const customComp) @@ -239,7 +239,7 @@ private: if (! selectsDirectories && FAILED (dialog.SetFileTypes (numElementsInArray (spec), spec))) return false; - struct Events : public ComBaseClassHelper + struct Events final : public ComBaseClassHelper { explicit Events (Win32NativeFileChooser& o) : owner (o) {} @@ -811,9 +811,9 @@ private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32NativeFileChooser) }; -class FileChooser::Native : public std::enable_shared_from_this, - public Component, - public FileChooser::Pimpl +class FileChooser::Native final : public std::enable_shared_from_this, + public Component, + public FileChooser::Pimpl { public: Native (FileChooser& fileChooser, int flagsIn, FilePreviewComponent* previewComp) diff --git a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm index 1b43bf9285..e02ec39460 100644 --- a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm +++ b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm @@ -31,7 +31,7 @@ const auto menuItemInvokedSelector = @selector (menuItemInvoked:); JUCE_END_IGNORE_WARNINGS_GCC_LIKE //============================================================================== -struct JuceMainMenuBarHolder : private DeletedAtShutdown +struct JuceMainMenuBarHolder final : private DeletedAtShutdown { JuceMainMenuBarHolder() : mainMenuBar ([[NSMenu alloc] initWithTitle: nsStringLiteral ("MainMenu")]) @@ -68,8 +68,8 @@ struct JuceMainMenuBarHolder : private DeletedAtShutdown JUCE_IMPLEMENT_SINGLETON (JuceMainMenuBarHolder) //============================================================================== -class JuceMainMenuHandler : private MenuBarModel::Listener, - private DeletedAtShutdown +class JuceMainMenuHandler final : private MenuBarModel::Listener, + private DeletedAtShutdown { public: JuceMainMenuHandler() @@ -449,7 +449,7 @@ private: // When the f35Event is invoked, the item's enablement is checked and a // NSBeep is triggered if the item appears to be disabled. // This ValidatorClass exists solely to return YES from validateMenuItem. - struct ValidatorClass : public ObjCClass + struct ValidatorClass final : public ObjCClass { ValidatorClass() : ObjCClass ("JUCEMenuValidator_") { @@ -537,7 +537,7 @@ private: } //============================================================================== - struct JuceMenuCallbackClass : public ObjCClass + struct JuceMenuCallbackClass final : public ObjCClass { JuceMenuCallbackClass() : ObjCClass ("JUCEMainMenu_") { @@ -664,7 +664,7 @@ private: // This override is also important because it stops the base class // calling ModalComponentManager::bringToFront, which can get // recursive when file dialogs are involved - struct SilentDummyModalComp : public Component + struct SilentDummyModalComp final : public Component { explicit SilentDummyModalComp (FilePreviewComponent* p) : preview (p) {} diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index 6718f99fe5..c35b78ac28 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -120,7 +120,7 @@ static constexpr int translateVirtualToAsciiKeyCode (int keyCode) noexcept constexpr int extendedKeyModifier = 0x30000; //============================================================================== -class JuceCALayerDelegate : public ObjCClass> +class JuceCALayerDelegate final : public ObjCClass> { public: struct Callback @@ -166,8 +166,8 @@ private: }; //============================================================================== -class NSViewComponentPeer : public ComponentPeer, - private JuceCALayerDelegate::Callback +class NSViewComponentPeer final : public ComponentPeer, + private JuceCALayerDelegate::Callback { public: NSViewComponentPeer (Component& comp, const int windowStyleFlags, NSView* viewToAttachTo) @@ -1757,7 +1757,7 @@ private: // avoid unnecessarily duplicating display-link threads. SharedResourcePointer sharedDisplayLinks; - class AsyncRepainter : private AsyncUpdater + class AsyncRepainter final : private AsyncUpdater { public: explicit AsyncRepainter (NSViewComponentPeer& o) : owner (o) {} @@ -2007,7 +2007,7 @@ private: //============================================================================== template -struct NSViewComponentPeerWrapper : public Base +struct NSViewComponentPeerWrapper : public Base { explicit NSViewComponentPeerWrapper (const char* baseName) : Base (baseName) @@ -2031,7 +2031,7 @@ struct NSViewComponentPeerWrapper : public Base }; //============================================================================== -struct JuceNSViewClass : public NSViewComponentPeerWrapper> +struct JuceNSViewClass final : public NSViewComponentPeerWrapper> { JuceNSViewClass() : NSViewComponentPeerWrapper ("JUCEView_") { @@ -2602,7 +2602,7 @@ private: }; //============================================================================== -struct JuceNSWindowClass : public NSViewComponentPeerWrapper> +struct JuceNSWindowClass final : public NSViewComponentPeerWrapper> { JuceNSWindowClass() : NSViewComponentPeerWrapper ("JUCEWindow_") { diff --git a/modules/juce_gui_basics/native/juce_NativeMessageBox_android.cpp b/modules/juce_gui_basics/native/juce_NativeMessageBox_android.cpp index d981ca8e23..28700800c1 100644 --- a/modules/juce_gui_basics/native/juce_NativeMessageBox_android.cpp +++ b/modules/juce_gui_basics/native/juce_NativeMessageBox_android.cpp @@ -28,7 +28,7 @@ namespace juce::detail std::unique_ptr ScopedMessageBoxInterface::create (const MessageBoxOptions& options) { - class AndroidMessageBox : public ScopedMessageBoxInterface + class AndroidMessageBox final : public ScopedMessageBoxInterface { public: explicit AndroidMessageBox (const MessageBoxOptions& o) : opts (o) {} diff --git a/modules/juce_gui_basics/native/juce_NativeMessageBox_ios.mm b/modules/juce_gui_basics/native/juce_NativeMessageBox_ios.mm index 37d0c1c5e1..9315c5469c 100644 --- a/modules/juce_gui_basics/native/juce_NativeMessageBox_ios.mm +++ b/modules/juce_gui_basics/native/juce_NativeMessageBox_ios.mm @@ -28,7 +28,7 @@ namespace juce::detail std::unique_ptr ScopedMessageBoxInterface::create (const MessageBoxOptions& options) { - class MessageBox : public ScopedMessageBoxInterface + class MessageBox final : public ScopedMessageBoxInterface { public: explicit MessageBox (const MessageBoxOptions& opts) : options (opts) {} diff --git a/modules/juce_gui_basics/native/juce_NativeMessageBox_linux.cpp b/modules/juce_gui_basics/native/juce_NativeMessageBox_linux.cpp index bdae465a8e..ba58f4397a 100644 --- a/modules/juce_gui_basics/native/juce_NativeMessageBox_linux.cpp +++ b/modules/juce_gui_basics/native/juce_NativeMessageBox_linux.cpp @@ -31,7 +31,7 @@ std::unique_ptr ScopedMessageBoxInterface::create (co // On Linux, we re-use the AlertWindow rather than using a platform-specific dialog. // For consistency with the NativeMessageBox on other platforms, the result code must // match the button index, hence this adapter. - class MessageBox : public ScopedMessageBoxInterface + class MessageBox final : public ScopedMessageBoxInterface { public: explicit MessageBox (const MessageBoxOptions& options) diff --git a/modules/juce_gui_basics/native/juce_NativeMessageBox_mac.mm b/modules/juce_gui_basics/native/juce_NativeMessageBox_mac.mm index 359607e080..81b80c5f05 100644 --- a/modules/juce_gui_basics/native/juce_NativeMessageBox_mac.mm +++ b/modules/juce_gui_basics/native/juce_NativeMessageBox_mac.mm @@ -28,7 +28,7 @@ namespace juce::detail std::unique_ptr ScopedMessageBoxInterface::create (const MessageBoxOptions& options) { - class OSXMessageBox : public ScopedMessageBoxInterface + class OSXMessageBox final : public ScopedMessageBoxInterface { public: explicit OSXMessageBox (const MessageBoxOptions& opts) diff --git a/modules/juce_gui_basics/native/juce_NativeMessageBox_windows.cpp b/modules/juce_gui_basics/native/juce_NativeMessageBox_windows.cpp index a96c9b877f..6310cfb05c 100644 --- a/modules/juce_gui_basics/native/juce_NativeMessageBox_windows.cpp +++ b/modules/juce_gui_basics/native/juce_NativeMessageBox_windows.cpp @@ -40,7 +40,7 @@ namespace juce::detail std::unique_ptr ScopedMessageBoxInterface::create (const MessageBoxOptions& options) { - class WindowsMessageBoxBase : public ScopedMessageBoxInterface + class WindowsMessageBoxBase : public ScopedMessageBoxInterface { public: explicit WindowsMessageBoxBase (Component* comp) @@ -106,7 +106,7 @@ std::unique_ptr ScopedMessageBoxInterface::create (co JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsMessageBoxBase) }; - class PreVistaMessageBox : public WindowsMessageBoxBase + class PreVistaMessageBox final : public WindowsMessageBoxBase { public: PreVistaMessageBox (const MessageBoxOptions& opts, UINT extraFlags) @@ -199,7 +199,7 @@ std::unique_ptr ScopedMessageBoxInterface::create (co JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PreVistaMessageBox) }; - class WindowsTaskDialog : public WindowsMessageBoxBase + class WindowsTaskDialog final : public WindowsMessageBoxBase { static auto getTaskDialogFunc() { diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index 2b799c8ac3..bff76fa3e2 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -387,8 +387,8 @@ struct UIViewPeerControllerReceiver }; //============================================================================== -class UIViewComponentPeer : public ComponentPeer, - public UIViewPeerControllerReceiver +class UIViewComponentPeer final : public ComponentPeer, + public UIViewPeerControllerReceiver { public: UIViewComponentPeer (Component&, int windowStyleFlags, UIView* viewToAttachTo); @@ -543,7 +543,7 @@ private: } //============================================================================== - class AsyncRepaintMessage : public CallbackMessage + class AsyncRepaintMessage final : public CallbackMessage { public: UIViewComponentPeer* const peer; diff --git a/modules/juce_gui_basics/native/juce_Windowing_android.cpp b/modules/juce_gui_basics/native/juce_Windowing_android.cpp index 54023247d0..df3f929740 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_android.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_android.cpp @@ -1223,8 +1223,8 @@ static constexpr int translateAndroidKeyboardFlags (int javaFlags) noexcept } //============================================================================== -class AndroidComponentPeer : public ComponentPeer, - private Timer +class AndroidComponentPeer final : public ComponentPeer, + private Timer { public: AndroidComponentPeer (Component& comp, int windowStyleFlags, void* nativeViewHandle) @@ -1915,7 +1915,7 @@ public: static int64 touchesDown; //============================================================================== - struct StartupActivityCallbackListener : public ActivityLifecycleCallbacks + struct StartupActivityCallbackListener final : public ActivityLifecycleCallbacks { void onActivityStarted (jobject /*activity*/) override { @@ -2074,7 +2074,7 @@ private: } //============================================================================== - class ViewWindowInsetsListener : public juce::AndroidInterfaceImplementer + class ViewWindowInsetsListener final : public juce::AndroidInterfaceImplementer { public: jobject onApplyWindowInsets (LocalRef, LocalRef insets) @@ -2115,7 +2115,7 @@ private: }; //============================================================================== - struct PreallocatedImage : public ImagePixelData + struct PreallocatedImage final : public ImagePixelData { PreallocatedImage (int width_, int height_, jint* data_, bool hasAlpha_) : ImagePixelData (Image::ARGB, width_, height_), data (data_), hasAlpha (hasAlpha_) @@ -2458,7 +2458,7 @@ DECLARE_JNI_CLASS (AndroidDialogOnClickListener, "android/content/DialogInterfac #undef JNI_CLASS_MEMBERS //============================================================================== -class DialogListener : public juce::AndroidInterfaceImplementer +class DialogListener final : public juce::AndroidInterfaceImplementer { public: explicit DialogListener (std::function cb) : callback (std::move (cb)) {} @@ -2568,7 +2568,7 @@ DECLARE_JNI_CLASS (AndroidDisplayMetrics, "android/util/DisplayMetrics") #undef JNI_CLASS_MEMBERS //============================================================================== -class LayoutChangeListener : public juce::AndroidInterfaceImplementer +class LayoutChangeListener : public juce::AndroidInterfaceImplementer { public: virtual void onLayoutChange (LocalRef view, int left, int top, int right, int bottom, @@ -2607,7 +2607,7 @@ private: }; //============================================================================== -struct MainActivityWindowLayoutListener : public LayoutChangeListener +struct MainActivityWindowLayoutListener final : public LayoutChangeListener { MainActivityWindowLayoutListener (std::function&& updateDisplaysCb) : forceDisplayUpdate (std::move (updateDisplaysCb)) diff --git a/modules/juce_gui_basics/native/juce_Windowing_ios.mm b/modules/juce_gui_basics/native/juce_Windowing_ios.mm index 2a62a5eb5c..ba542d11d5 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_ios.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_ios.mm @@ -556,7 +556,7 @@ public: } private: - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCEDelegate_") { @@ -674,7 +674,7 @@ void Displays::findDisplays (float masterScale) auto getInsets() const { return insets; } private: - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCEOnScreenKeyboardObserver_") { diff --git a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp index 8e6f707dfe..9f4b8aa798 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp @@ -27,8 +27,8 @@ namespace juce { //============================================================================== -class LinuxComponentPeer : public ComponentPeer, - private XWindowSystemUtilities::XSettings::Listener +class LinuxComponentPeer final : public ComponentPeer, + private XWindowSystemUtilities::XSettings::Listener { public: LinuxComponentPeer (Component& comp, int windowStyleFlags, ::Window parentToAddTo) @@ -509,7 +509,7 @@ private: JUCE_DECLARE_NON_COPYABLE (LinuxRepaintManager) }; - class LinuxVBlankManager : public Timer + class LinuxVBlankManager final : public Timer { public: explicit LinuxVBlankManager (std::function cb) : callback (std::move (cb)) diff --git a/modules/juce_gui_basics/native/juce_Windowing_mac.mm b/modules/juce_gui_basics/native/juce_Windowing_mac.mm index 40a0a83e73..9217bb9869 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_mac.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_mac.mm @@ -53,7 +53,7 @@ static NSView* getNSViewForDragEvent (Component* sourceComp) return nil; } -class NSDraggingSourceHelper : public ObjCClass> +class NSDraggingSourceHelper final : public ObjCClass> { public: static void setText (id self, const String& text) @@ -312,7 +312,7 @@ public: } private: - struct DelegateClass : public ObjCClass + struct DelegateClass final : public ObjCClass { DelegateClass() : ObjCClass ("JUCEDelegate_") { @@ -333,7 +333,7 @@ std::unique_ptr Desktop::createNative } //============================================================================== -class ScreenSaverDefeater : public Timer +class ScreenSaverDefeater final : public Timer { public: ScreenSaverDefeater() @@ -394,7 +394,7 @@ bool Desktop::isScreenSaverEnabled() } //============================================================================== -struct DisplaySettingsChangeCallback : private DeletedAtShutdown +struct DisplaySettingsChangeCallback final : private DeletedAtShutdown { DisplaySettingsChangeCallback() { diff --git a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp index 44070735a5..aee5fb9891 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp @@ -969,7 +969,7 @@ const int KeyPress::rewindKey = 0x30003; //============================================================================== -class WindowsBitmapImage : public ImagePixelData +class WindowsBitmapImage final : public ImagePixelData { public: WindowsBitmapImage (const Image::PixelFormat format, @@ -1159,7 +1159,7 @@ namespace IconConverters if (icon == nullptr) return {}; - struct ScopedICONINFO : public ICONINFO + struct ScopedICONINFO final : public ICONINFO { ScopedICONINFO() { @@ -1425,8 +1425,8 @@ static HMONITOR getMonitorFromOutput (ComSmartPtr output) using VBlankListener = ComponentPeer::VBlankListener; //============================================================================== -class VSyncThread : private Thread, - private AsyncUpdater +class VSyncThread final : private Thread, + private AsyncUpdater { public: VSyncThread (ComSmartPtr out, @@ -1514,7 +1514,7 @@ private: }; //============================================================================== -class VBlankDispatcher : public DeletedAtShutdown +class VBlankDispatcher final : public DeletedAtShutdown { public: void updateDisplay (VBlankListener& listener, HMONITOR monitor) @@ -1654,7 +1654,7 @@ private: JUCE_IMPLEMENT_SINGLETON (VBlankDispatcher) //============================================================================== -class SimpleTimer : private Timer +class SimpleTimer final : private Timer { public: SimpleTimer (int intervalMs, std::function callbackIn) @@ -1679,12 +1679,12 @@ private: }; //============================================================================== -class HWNDComponentPeer : public ComponentPeer, - private VBlankListener, - private Timer - #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client - , public ModifierKeyReceiver - #endif +class HWNDComponentPeer final : public ComponentPeer, + private VBlankListener, + private Timer + #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client + , public ModifierKeyReceiver + #endif { public: enum RenderingEngineType @@ -2192,7 +2192,7 @@ public: static ModifierKeys modifiersAtLastCallback; //============================================================================== - struct FileDropTarget : public ComBaseClassHelper + struct FileDropTarget final : public ComBaseClassHelper { FileDropTarget (HWNDComponentPeer& p) : peer (p) {} @@ -2425,7 +2425,7 @@ private: static MultiTouchMapper currentTouches; //============================================================================== - struct TemporaryImage : private Timer + struct TemporaryImage final : private Timer { TemporaryImage() {} @@ -2455,7 +2455,7 @@ private: TemporaryImage offscreenImageGenerator; //============================================================================== - class WindowClassHolder : private DeletedAtShutdown + class WindowClassHolder final : private DeletedAtShutdown { public: WindowClassHolder() @@ -4851,7 +4851,7 @@ void MouseInputSource::setRawMousePosition (Point newPosition) } //============================================================================== -class ScreenSaverDefeater : public Timer +class ScreenSaverDefeater final : public Timer { public: ScreenSaverDefeater() diff --git a/modules/juce_gui_basics/native/juce_WindowsHooks_windows.cpp b/modules/juce_gui_basics/native/juce_WindowsHooks_windows.cpp index 8407640129..5a3fae24ae 100644 --- a/modules/juce_gui_basics/native/juce_WindowsHooks_windows.cpp +++ b/modules/juce_gui_basics/native/juce_WindowsHooks_windows.cpp @@ -50,7 +50,7 @@ private: if (nCode >= 0 && wParam == WM_MOUSEWHEEL) { // using a local copy of this struct to support old mingw libraries - struct MOUSEHOOKSTRUCTEX_ : public MOUSEHOOKSTRUCT { DWORD mouseData; }; + struct MOUSEHOOKSTRUCTEX_ final : public MOUSEHOOKSTRUCT { DWORD mouseData; }; auto& hs = *(MOUSEHOOKSTRUCTEX_*) lParam; diff --git a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp index 22877c9b7f..20cfe8087d 100644 --- a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp +++ b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp @@ -844,7 +844,7 @@ namespace Visuals } //================================= X11 - Bitmap =============================== -class XBitmapImage : public ImagePixelData +class XBitmapImage final : public ImagePixelData { public: explicit XBitmapImage (XImage* image) diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp index c5ac113724..6c802a3875 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp @@ -26,7 +26,7 @@ namespace juce { -struct MarkerListScope : public Expression::Scope +struct MarkerListScope final : public Expression::Scope { MarkerListScope (Component& comp) : component (comp) {} @@ -156,7 +156,7 @@ Component* RelativeCoordinatePositionerBase::ComponentScope::findSiblingComponen } //============================================================================== -class RelativeCoordinatePositionerBase::DependencyFinderScope : public ComponentScope +class RelativeCoordinatePositionerBase::DependencyFinderScope final : public ComponentScope { public: DependencyFinderScope (Component& comp, RelativeCoordinatePositionerBase& p, bool& result) diff --git a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp index a501e15563..dae3cda412 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp @@ -116,7 +116,7 @@ bool RelativeRectangle::operator!= (const RelativeRectangle& other) const noexce //============================================================================== // An expression context that can evaluate expressions using "this" -class RelativeRectangleLocalScope : public Expression::Scope +class RelativeRectangleLocalScope final : public Expression::Scope { public: RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {} @@ -197,7 +197,7 @@ void RelativeRectangle::renameSymbol (const Expression::Symbol& oldSymbol, const } //============================================================================== -class RelativeRectangleComponentPositioner : public RelativeCoordinatePositionerBase +class RelativeRectangleComponentPositioner final : public RelativeCoordinatePositionerBase { public: RelativeRectangleComponentPositioner (Component& comp, const RelativeRectangle& r) diff --git a/modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp index 6a87852939..64688c3443 100644 --- a/modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_ChoicePropertyComponent.cpp @@ -27,8 +27,8 @@ namespace juce { //============================================================================== -class ChoiceRemapperValueSource : public Value::ValueSource, - private Value::Listener +class ChoiceRemapperValueSource final : public Value::ValueSource, + private Value::Listener { public: ChoiceRemapperValueSource (const Value& source, const Array& map) @@ -68,8 +68,8 @@ protected: }; //============================================================================== -class ChoiceRemapperValueSourceWithDefault : public Value::ValueSource, - private Value::Listener +class ChoiceRemapperValueSourceWithDefault final : public Value::ValueSource, + private Value::Listener { public: ChoiceRemapperValueSourceWithDefault (const ValueTreePropertyWithDefault& v, const Array& map) diff --git a/modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp index 474555f729..8503b3c0c4 100644 --- a/modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_MultiChoicePropertyComponent.cpp @@ -49,8 +49,8 @@ static void updateButtonTickColour (ToggleButton* button, bool usingDefault) } //============================================================================== -class MultiChoicePropertyComponent::MultiChoiceRemapperSource : public Value::ValueSource, - private Value::Listener +class MultiChoicePropertyComponent::MultiChoiceRemapperSource final : public Value::ValueSource, + private Value::Listener { public: MultiChoiceRemapperSource (const Value& source, var v, int c) @@ -107,8 +107,8 @@ private: }; //============================================================================== -class MultiChoicePropertyComponent::MultiChoiceRemapperSourceWithDefault : public Value::ValueSource, - private Value::Listener +class MultiChoicePropertyComponent::MultiChoiceRemapperSourceWithDefault final : public Value::ValueSource, + private Value::Listener { public: MultiChoiceRemapperSourceWithDefault (const ValueTreePropertyWithDefault& val, diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp index 9f8ce9a51a..6528581cb0 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp @@ -26,7 +26,7 @@ namespace juce { -struct PropertyPanel::SectionComponent : public Component +struct PropertyPanel::SectionComponent final : public Component { SectionComponent (const String& sectionTitle, const Array& newProperties, @@ -136,7 +136,7 @@ struct PropertyPanel::SectionComponent : public Component }; //============================================================================== -struct PropertyPanel::PropertyHolderComponent : public Component +struct PropertyPanel::PropertyHolderComponent final : public Component { PropertyHolderComponent() {} diff --git a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp index 27663aa179..797262bf94 100644 --- a/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_TextPropertyComponent.cpp @@ -27,8 +27,8 @@ namespace juce { //============================================================================== -class TextPropertyComponent::LabelComp : public Label, - public FileDragAndDropTarget +class TextPropertyComponent::LabelComp final : public Label, + public FileDragAndDropTarget { public: LabelComp (TextPropertyComponent& tpc, int charLimit, bool multiline, bool editable) @@ -120,7 +120,7 @@ private: }; //============================================================================== -class TextRemapperValueSourceWithDefault : public Value::ValueSource +class TextRemapperValueSourceWithDefault final : public Value::ValueSource { public: TextRemapperValueSourceWithDefault (const ValueTreePropertyWithDefault& v) diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index 9dc8fcf0cc..bcedfe3c79 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -650,7 +650,7 @@ void ComboBox::setSelectedId (const int newItemId, const bool dontSendChange) void ComboBox::setText (const String& newText, const bool dontSendChange) { setText (newText, dontSendChange ? dontSendNotification : sendNotification); } //============================================================================== -class ComboBoxAccessibilityHandler : public AccessibilityHandler +class ComboBoxAccessibilityHandler final : public AccessibilityHandler { public: explicit ComboBoxAccessibilityHandler (ComboBox& comboBoxToWrap) @@ -673,7 +673,7 @@ public: String getHelp() const override { return comboBox.getTooltip(); } private: - class ComboBoxValueInterface : public AccessibilityTextValueInterface + class ComboBoxValueInterface final : public AccessibilityTextValueInterface { public: explicit ComboBoxValueInterface (ComboBox& comboBoxToWrap) diff --git a/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp b/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp index 56d56d103c..43861dfe0f 100644 --- a/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp +++ b/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp @@ -83,7 +83,7 @@ void ImageComponent::paint (Graphics& g) //============================================================================== std::unique_ptr ImageComponent::createAccessibilityHandler() { - class ImageComponentAccessibilityHandler : public AccessibilityHandler + class ImageComponentAccessibilityHandler final : public AccessibilityHandler { public: explicit ImageComponentAccessibilityHandler (ImageComponent& imageComponentToWrap) diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index 8723041754..31dad478f5 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -397,7 +397,7 @@ void Label::setMinimumHorizontalScale (const float newScale) //============================================================================== // We'll use a custom focus traverser here to make sure focus goes from the // text editor to another component rather than back to the label itself. -class LabelKeyboardFocusTraverser : public KeyboardFocusTraverser +class LabelKeyboardFocusTraverser final : public KeyboardFocusTraverser { public: explicit LabelKeyboardFocusTraverser (Label& l) : owner (l) {} @@ -518,7 +518,7 @@ void Label::textEditorFocusLost (TextEditor& ed) } //============================================================================== -class LabelAccessibilityHandler : public AccessibilityHandler +class LabelAccessibilityHandler final : public AccessibilityHandler { public: explicit LabelAccessibilityHandler (Label& labelToWrap) @@ -542,7 +542,7 @@ public: } private: - class LabelValueInterface : public AccessibilityTextValueInterface + class LabelValueInterface final : public AccessibilityTextValueInterface { public: explicit LabelValueInterface (Label& labelToWrap) diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 10adefa247..bb9fca4849 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -151,8 +151,8 @@ private: }; //============================================================================== -class ListBox::RowComponent : public TooltipClient, - public ComponentWithListRowMouseBehaviours +class ListBox::RowComponent final : public TooltipClient, + public ComponentWithListRowMouseBehaviours { public: explicit RowComponent (ListBox& lb) : owner (lb) {} @@ -227,7 +227,7 @@ public: private: //============================================================================== - class RowAccessibilityHandler : public AccessibilityHandler + class RowAccessibilityHandler final : public AccessibilityHandler { public: explicit RowAccessibilityHandler (RowComponent& rowComponentToWrap) @@ -269,7 +269,7 @@ private: } private: - class RowCellInterface : public AccessibilityCellInterface + class RowCellInterface final : public AccessibilityCellInterface { public: explicit RowCellInterface (RowAccessibilityHandler& h) : handler (h) {} @@ -297,15 +297,15 @@ private: //============================================================================== -class ListBox::ListViewport : public Viewport, - private Timer +class ListBox::ListViewport final : public Viewport, + private Timer { public: ListViewport (ListBox& lb) : owner (lb) { setWantsKeyboardFocus (false); - struct IgnoredComponent : Component + struct IgnoredComponent final : public Component { std::unique_ptr createAccessibilityHandler() override { @@ -512,7 +512,7 @@ private: }; //============================================================================== -struct ListBoxMouseMoveSelector : public MouseListener +struct ListBoxMouseMoveSelector final : public MouseListener { ListBoxMouseMoveSelector (ListBox& lb) : owner (lb) { @@ -1159,7 +1159,7 @@ void ListBox::startDragAndDrop (const MouseEvent& e, const SparseSet& rowsT std::unique_ptr ListBox::createAccessibilityHandler() { - class TableInterface : public AccessibilityTableInterface + class TableInterface final : public AccessibilityTableInterface { public: explicit TableInterface (ListBox& listBoxToWrap) diff --git a/modules/juce_gui_basics/widgets/juce_ProgressBar.cpp b/modules/juce_gui_basics/widgets/juce_ProgressBar.cpp index 5ca85b798e..91964f8093 100644 --- a/modules/juce_gui_basics/widgets/juce_ProgressBar.cpp +++ b/modules/juce_gui_basics/widgets/juce_ProgressBar.cpp @@ -133,7 +133,7 @@ void ProgressBar::timerCallback() //============================================================================== std::unique_ptr ProgressBar::createAccessibilityHandler() { - class ProgressBarAccessibilityHandler : public AccessibilityHandler + class ProgressBarAccessibilityHandler final : public AccessibilityHandler { public: explicit ProgressBarAccessibilityHandler (ProgressBar& progressBarToWrap) @@ -148,7 +148,7 @@ std::unique_ptr ProgressBar::createAccessibilityHandler() String getHelp() const override { return progressBar.getTooltip(); } private: - class ValueInterface : public AccessibilityRangedNumericValueInterface + class ValueInterface final : public AccessibilityRangedNumericValueInterface { public: explicit ValueInterface (ProgressBar& progressBarToWrap) diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index 3d531fd486..03f945fb46 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1347,8 +1347,8 @@ public: std::unique_ptr