diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index 2f3d02ca21..2a8b37d709 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -112,7 +112,7 @@ public: } /** Subclasses should override this to paint the Block object on the screen */ - virtual void paint (Graphics&) override = 0; + void paint (Graphics&) override = 0; /** Subclasses can override this to receive button down events from the Block */ virtual void handleButtonPressed (ControlButton::ButtonFunction, uint32) {} @@ -446,7 +446,7 @@ private: {} /** Subclasses should override this to paint the button on the screen */ - virtual void paint (Graphics&) override = 0; + void paint (Graphics&) override = 0; /** Sets the colour of the button */ void setColour (Colour c) { componentColour = c; } diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index 0745c82cfa..0b91b4df32 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -122,7 +122,7 @@ public: } /** Subclasses should override this to say whether they can play the given sound */ - virtual bool canPlaySound (SynthesiserSound*) override = 0; + bool canPlaySound (SynthesiserSound*) override = 0; /** Subclasses should override this to render a waveshape */ virtual double renderWaveShape (const double currentPhase) = 0; diff --git a/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h b/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h index a41822e84b..ccc88afad6 100644 --- a/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h +++ b/extras/Projucer/Source/LiveBuildEngine/UI/jucer_ErrorListComponent.h @@ -234,7 +234,7 @@ private: bool mightContainSubItems() override { return getNumSubItems() != 0; } String getUniqueName() const override { return uniqueID; } - void paintContent (Graphics& g, const Rectangle& area) override + void paintContent (Graphics& g, Rectangle area) override { jassert (area.getWidth() >= 0); diff --git a/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.cpp b/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.cpp index 71fc687ac1..861f490d2a 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.cpp +++ b/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.cpp @@ -118,7 +118,7 @@ Colour JucerTreeViewBase::getContentColour (bool isIcon) const return getOwnerView()->findColour (isIcon ? treeIconColourId : defaultTextColourId); } -void JucerTreeViewBase::paintContent (Graphics& g, const Rectangle& area) +void JucerTreeViewBase::paintContent (Graphics& g, Rectangle area) { g.setFont (getFont()); g.setColour (getContentColour (false)); diff --git a/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.h b/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.h index b758d923f7..3f63af5165 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.h +++ b/extras/Projucer/Source/Utility/UI/jucer_JucerTreeViewBase.h @@ -45,6 +45,8 @@ public: void itemClicked (const MouseEvent& e) override; void itemSelectionChanged (bool isNowSelected) override; void itemDoubleClicked (const MouseEvent&) override; + Component* createItemComponent() override; + String getTooltip() override { return {}; } void cancelDelayedSelectionTimer(); @@ -59,12 +61,11 @@ public: virtual Icon getIcon() const = 0; virtual bool isIconCrossedOut() const { return false; } virtual void paintIcon (Graphics& g, Rectangle area); - virtual void paintContent (Graphics& g, const Rectangle& area); + virtual void paintContent (Graphics& g, Rectangle area); virtual int getRightHandButtonSpace() { return 0; } virtual Colour getContentColour (bool isIcon) const; virtual int getMillisecsAllowedForDragGesture() { return 120; } virtual File getDraggableFile() const { return {}; } - virtual Component* createItemComponent() override; void refreshSubItems(); virtual void deleteItem(); @@ -79,8 +80,6 @@ public: virtual void handlePopupMenuResult (int resultCode); virtual void setSearchFilter (const String&) {} - String getTooltip() override { return {}; } - //============================================================================== // To handle situations where an item gets deleted before openness is // restored for it, this OpennessRestorer keeps only a pointer to the diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index fb0b44e7d9..162fd1a8d1 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -479,7 +479,7 @@ public: static void test (UnitTest& unitTest, bool inPlace, Random& r) { - constexpr int numSamples = 2048; + const int numSamples = 2048; int32 original[numSamples], converted[numSamples], reversed[numSamples]; { diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h index 09c91645bb..1dfae9d843 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h @@ -188,7 +188,7 @@ protected: renderNextBlock(). Do not call it yourself, otherwise the internal MPE note state will become inconsistent. */ - virtual void noteAdded (MPENote newNote) override; + void noteAdded (MPENote newNote) override; /** Stops playing a note. @@ -203,7 +203,7 @@ protected: renderNextBlock(). Do not call it yourself, otherwise the internal MPE note state will become inconsistent. */ - virtual void noteReleased (MPENote finishedNote) override; + void noteReleased (MPENote finishedNote) override; /** Will find any voice that is currently playing changedNote, update its currently playing note, and call its notePressureChanged method. @@ -211,7 +211,7 @@ protected: This method will be called automatically according to the midi data passed into renderNextBlock(). Do not call it yourself. */ - virtual void notePressureChanged (MPENote changedNote) override; + void notePressureChanged (MPENote changedNote) override; /** Will find any voice that is currently playing changedNote, update its currently playing note, and call its notePitchbendChanged method. @@ -219,7 +219,7 @@ protected: This method will be called automatically according to the midi data passed into renderNextBlock(). Do not call it yourself. */ - virtual void notePitchbendChanged (MPENote changedNote) override; + void notePitchbendChanged (MPENote changedNote) override; /** Will find any voice that is currently playing changedNote, update its currently playing note, and call its noteTimbreChanged method. @@ -227,7 +227,7 @@ protected: This method will be called automatically according to the midi data passed into renderNextBlock(). Do not call it yourself. */ - virtual void noteTimbreChanged (MPENote changedNote) override; + void noteTimbreChanged (MPENote changedNote) override; /** Will find any voice that is currently playing changedNote, update its currently playing note, and call its noteKeyStateChanged method. @@ -235,24 +235,24 @@ protected: This method will be called automatically according to the midi data passed into renderNextBlock(). Do not call it yourself. */ - virtual void noteKeyStateChanged (MPENote changedNote) override; + void noteKeyStateChanged (MPENote changedNote) override; //============================================================================== /** This will simply call renderNextBlock for each currently active voice and fill the buffer with the sum. Override this method if you need to do more work to render your audio. */ - virtual void renderNextSubBlock (AudioBuffer& outputAudio, - int startSample, - int numSamples) override; + void renderNextSubBlock (AudioBuffer& outputAudio, + int startSample, + int numSamples) override; /** This will simply call renderNextBlock for each currently active voice and fill the buffer with the sum. (souble-precision version) Override this method if you need to do more work to render your audio. */ - virtual void renderNextSubBlock (AudioBuffer& outputAudio, - int startSample, - int numSamples) override; + void renderNextSubBlock (AudioBuffer& outputAudio, + int startSample, + int numSamples) override; //============================================================================== /** Searches through the voices to find one that's not currently playing, and diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 52248d4b59..19d5531f7e 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -333,7 +333,7 @@ public: auValueStrings = Parameter::getAllValueStrings(); } - virtual float getValue() const override + float getValue() const override { const ScopedLock sl (pluginInstance.lock); @@ -348,7 +348,7 @@ public: return value; } - virtual void setValue (float newValue) override + void setValue (float newValue) override { const ScopedLock sl (pluginInstance.lock); diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp index ecb0ccb7fd..930269c646 100644 --- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp @@ -423,7 +423,7 @@ private: reset(); } - virtual float getValue() const override + float getValue() const override { if (pluginInstance.plugin != nullptr) { @@ -450,7 +450,7 @@ private: return {}; } - virtual void setValue (float newValue) override + void setValue (float newValue) override { if (auto* interface = pluginInstance.plugin) { diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index a223217418..d583136895 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1610,7 +1610,7 @@ public: { } - virtual float getValue() const override + float getValue() const override { if (pluginInstance.editController != nullptr) { @@ -1622,7 +1622,7 @@ public: return 0.0f; } - virtual void setValue (float newValue) override + void setValue (float newValue) override { if (pluginInstance.editController != nullptr) { diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 61df829766..687d8f0bb6 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -861,7 +861,7 @@ struct VSTPluginInstance : public AudioPluginInstance, { } - virtual float getValue() const override + float getValue() const override { if (auto* effect = pluginInstance.vstEffect) { @@ -873,7 +873,7 @@ struct VSTPluginInstance : public AudioPluginInstance, return 0.0f; } - virtual void setValue (float newValue) override + void setValue (float newValue) override { if (auto* effect = pluginInstance.vstEffect) { diff --git a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h index f2c03a939a..8bdcef6263 100644 --- a/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h +++ b/modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h @@ -1318,7 +1318,7 @@ private: { Expression (const CodeLocation& l, BlockPtr parent) noexcept : Statement (l, parent) {} virtual Type getType (CodeGenerator&) const = 0; - virtual ExpPtr simplify (SyntaxTreeBuilder&) override { return this; } + ExpPtr simplify (SyntaxTreeBuilder&) override { return this; } virtual String getIdentifier() const { location.throwError ("This operator requires an assignable variable"); return {}; } }; diff --git a/modules/juce_data_structures/values/juce_Value.h b/modules/juce_data_structures/values/juce_Value.h index b22cf80c61..c798b6312e 100644 --- a/modules/juce_data_structures/values/juce_Value.h +++ b/modules/juce_data_structures/values/juce_Value.h @@ -180,7 +180,7 @@ public: { public: ValueSource(); - virtual ~ValueSource() override; + ~ValueSource() override; /** Returns the current value of this object. */ virtual var getValue() const = 0; diff --git a/modules/juce_gui_basics/buttons/juce_Button.h b/modules/juce_gui_basics/buttons/juce_Button.h index 8c71a4ac58..73dfd3ce5f 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.h +++ b/modules/juce_gui_basics/buttons/juce_Button.h @@ -54,7 +54,7 @@ protected: public: /** Destructor. */ - virtual ~Button() override; + ~Button() override; //============================================================================== /** Changes the button's text. diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h index 03b16c45c6..8639a2bd2a 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h @@ -102,7 +102,7 @@ public: Make sure that you don't delete this if pointers to it are still being used by objects such as PopupMenus or Buttons. */ - virtual ~ApplicationCommandManager() override; + ~ApplicationCommandManager() override; //============================================================================== /** Clears the current list of all commands. diff --git a/modules/juce_gui_basics/components/juce_Component.h b/modules/juce_gui_basics/components/juce_Component.h index 255dc3f4f4..8ee75862a1 100644 --- a/modules/juce_gui_basics/components/juce_Component.h +++ b/modules/juce_gui_basics/components/juce_Component.h @@ -1480,7 +1480,7 @@ public: the source component in which it occurred @see mouseEnter, mouseExit, mouseDrag, contains */ - virtual void mouseMove (const MouseEvent& event) override; + void mouseMove (const MouseEvent& event) override; /** Called when the mouse first enters a component. @@ -1496,7 +1496,7 @@ public: the source component in which it occurred @see mouseExit, mouseDrag, mouseMove, contains */ - virtual void mouseEnter (const MouseEvent& event) override; + void mouseEnter (const MouseEvent& event) override; /** Called when the mouse moves out of a component. @@ -1511,7 +1511,7 @@ public: the source component in which it occurred @see mouseEnter, mouseDrag, mouseMove, contains */ - virtual void mouseExit (const MouseEvent& event) override; + void mouseExit (const MouseEvent& event) override; /** Called when a mouse button is pressed. @@ -1526,7 +1526,7 @@ public: the source component in which it occurred @see mouseUp, mouseDrag, mouseDoubleClick, contains */ - virtual void mouseDown (const MouseEvent& event) override; + void mouseDown (const MouseEvent& event) override; /** Called when the mouse is moved while a button is held down. @@ -1538,7 +1538,7 @@ public: the source component in which it occurred @see mouseDown, mouseUp, mouseMove, contains, setDragRepeatInterval */ - virtual void mouseDrag (const MouseEvent& event) override; + void mouseDrag (const MouseEvent& event) override; /** Called when a mouse button is released. @@ -1553,7 +1553,7 @@ public: the source component in which it occurred @see mouseDown, mouseDrag, mouseDoubleClick, contains */ - virtual void mouseUp (const MouseEvent& event) override; + void mouseUp (const MouseEvent& event) override; /** Called when a mouse button has been double-clicked on a component. @@ -1565,7 +1565,7 @@ public: the source component in which it occurred @see mouseDown, mouseUp */ - virtual void mouseDoubleClick (const MouseEvent& event) override; + void mouseDoubleClick (const MouseEvent& event) override; /** Called when the mouse-wheel is moved. @@ -1582,8 +1582,8 @@ public: @param event details about the mouse event @param wheel details about the mouse wheel movement */ - virtual void mouseWheelMove (const MouseEvent& event, - const MouseWheelDetails& wheel) override; + void mouseWheelMove (const MouseEvent& event, + const MouseWheelDetails& wheel) override; /** Called when a pinch-to-zoom mouse-gesture is used. @@ -1596,7 +1596,7 @@ public: should be changed. A value of 1.0 would indicate no change, values greater than 1.0 mean it should be enlarged. */ - virtual void mouseMagnify (const MouseEvent& event, float scaleFactor) override; + void mouseMagnify (const MouseEvent& event, float scaleFactor) override; //============================================================================== /** Ensures that a non-stop stream of mouse-drag events will be sent during the diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index c687476be8..671450807d 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -47,7 +47,7 @@ protected: public: /** Destructor. */ - virtual ~Drawable() override; + ~Drawable() override; //============================================================================== /** Creates a deep copy of this Drawable object. diff --git a/modules/juce_gui_basics/menus/juce_MenuBarModel.h b/modules/juce_gui_basics/menus/juce_MenuBarModel.h index 3dce8d2bbb..2192ca3ff2 100644 --- a/modules/juce_gui_basics/menus/juce_MenuBarModel.h +++ b/modules/juce_gui_basics/menus/juce_MenuBarModel.h @@ -46,7 +46,7 @@ public: MenuBarModel() noexcept; /** Destructor. */ - virtual ~MenuBarModel() override; + ~MenuBarModel() override; //============================================================================== /** Call this when some of your menu items have changed. diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index 4780dd6c23..0ed43d4851 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -58,10 +58,10 @@ public: @param componentName the name to set for the component (see Component::setName()) */ - explicit ComboBox (const String& componentName = String()); + explicit ComboBox (const String& componentName = {}); /** Destructor. */ - virtual ~ComboBox() override; + ~ComboBox() override; //============================================================================== /** Sets whether the text in the combo-box is editable.