From 06c1a154967f86cb1b36f87e1efe7ef95ff135a1 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 15 May 2015 12:54:44 +0100 Subject: [PATCH] Added some missing 'override' decorators --- .../components/jucer_TreeViewHandler.h | 4 ++-- .../format/juce_AudioFormatReaderSource.h | 4 ++-- modules/juce_audio_formats/sampler/juce_Sampler.h | 2 +- .../processors/juce_AudioProcessorGraph.h | 2 +- modules/juce_core/streams/juce_MemoryOutputStream.h | 2 +- .../juce_core/zip/juce_GZIPCompressorOutputStream.h | 2 +- .../app_properties/juce_PropertiesFile.h | 2 +- modules/juce_data_structures/values/juce_Value.cpp | 4 ++-- .../juce_data_structures/values/juce_ValueTree.cpp | 4 ++-- modules/juce_graphics/images/juce_Image.cpp | 4 ++-- .../juce_gui_basics/application/juce_Application.h | 8 ++++---- .../drawables/juce_DrawableComposite.h | 8 ++++---- .../filebrowser/juce_FileListComponent.h | 12 ++++++------ modules/juce_gui_basics/widgets/juce_Slider.cpp | 4 ++-- modules/juce_gui_basics/widgets/juce_Toolbar.cpp | 4 ++-- .../juce_gui_basics/windows/juce_DocumentWindow.h | 2 +- modules/juce_gui_extra/misc/juce_ColourSelector.h | 2 +- .../misc/juce_KeyMappingEditorComponent.cpp | 4 ++-- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h index 98d458dd16..891adea4dd 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h @@ -130,7 +130,7 @@ private: addSubItem (new DemoTreeViewItem ("Demo sub-node " + String (i), numItems - 1)); } - void paintItem (Graphics& g, int width, int height) + void paintItem (Graphics& g, int width, int height) override { if (isSelected()) g.fillAll (Colours::lightblue); @@ -140,7 +140,7 @@ private: g.drawText (name, 4, 0, width - 4, height, Justification::centredLeft, true); } - bool mightContainSubItems() + bool mightContainSubItems() override { return true; } diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h index d7ff5f7844..1569ede860 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h @@ -58,10 +58,10 @@ public: @see isLooping */ - void setLooping (bool shouldLoop); + void setLooping (bool shouldLoop) override; /** Returns whether loop-mode is turned on or not. */ - bool isLooping() const { return looping; } + bool isLooping() const override { return looping; } /** Returns the reader that's being used. */ AudioFormatReader* getAudioFormatReader() const noexcept { return reader; } diff --git a/modules/juce_audio_formats/sampler/juce_Sampler.h b/modules/juce_audio_formats/sampler/juce_Sampler.h index f801bf2329..cf1c5e2fcd 100644 --- a/modules/juce_audio_formats/sampler/juce_Sampler.h +++ b/modules/juce_audio_formats/sampler/juce_Sampler.h @@ -126,7 +126,7 @@ public: void startNote (int midiNoteNumber, float velocity, SynthesiserSound*, int pitchWheel) override; void stopNote (float velocity, bool allowTailOff) override; - void pitchWheelMoved (int newValue); + void pitchWheelMoved (int newValue) override; void controllerMoved (int controllerNumber, int newValue) override; void renderNextBlock (AudioSampleBuffer&, int startSample, int numSamples) override; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 319218f7f6..2079a53b0a 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -308,7 +308,7 @@ public: void fillInPluginDescription (PluginDescription&) const override; void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) override; void releaseResources() override; - void processBlock (AudioSampleBuffer&, MidiBuffer&); + void processBlock (AudioSampleBuffer&, MidiBuffer&) override; const String getInputChannelName (int channelIndex) const override; const String getOutputChannelName (int channelIndex) const override; diff --git a/modules/juce_core/streams/juce_MemoryOutputStream.h b/modules/juce_core/streams/juce_MemoryOutputStream.h index 2e764effe5..33cbb2e8ca 100644 --- a/modules/juce_core/streams/juce_MemoryOutputStream.h +++ b/modules/juce_core/streams/juce_MemoryOutputStream.h @@ -111,7 +111,7 @@ public: capacity off the block, so that its length matches the amount of actual data that has been written so far. */ - void flush(); + void flush() override; bool write (const void*, size_t) override; int64 getPosition() override { return (int64) position; } diff --git a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.h b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.h index 3309486a05..d45d5ae7d7 100644 --- a/modules/juce_core/zip/juce_GZIPCompressorOutputStream.h +++ b/modules/juce_core/zip/juce_GZIPCompressorOutputStream.h @@ -72,7 +72,7 @@ public: the stream is closed - this means that no more data can be written to it, and any subsequent attempts to call write() will cause an assertion. */ - void flush(); + void flush() override; int64 getPosition() override; bool setPosition (int64) override; diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h index f3d9551b11..a8198e699b 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h @@ -223,7 +223,7 @@ public: protected: /** @internal */ - virtual void propertyChanged(); + void propertyChanged() override; private: //============================================================================== diff --git a/modules/juce_data_structures/values/juce_Value.cpp b/modules/juce_data_structures/values/juce_Value.cpp index b0bb40507a..9fd05f40b8 100644 --- a/modules/juce_data_structures/values/juce_Value.cpp +++ b/modules/juce_data_structures/values/juce_Value.cpp @@ -72,12 +72,12 @@ public: { } - var getValue() const + var getValue() const override { return value; } - void setValue (const var& newValue) + void setValue (const var& newValue) override { if (! newValue.equalsWithSameType (value)) { diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index a5841da7c8..43cfc564c7 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -814,8 +814,8 @@ public: tree.removeListener (this); } - var getValue() const { return tree [property]; } - void setValue (const var& newValue) { tree.setProperty (property, newValue, undoManager); } + var getValue() const override { return tree [property]; } + void setValue (const var& newValue) override { tree.setProperty (property, newValue, undoManager); } private: ValueTree tree; diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index 6f142c83a1..7a0ddbe2ee 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -182,10 +182,10 @@ public: return newImage.getPixelData(); } - ImageType* createType() const override { return image->createType(); } + ImageType* createType() const override { return image->createType(); } /* as we always hold a reference to image, don't double count */ - int getSharedCount() const noexcept { return getReferenceCount() + image->getSharedCount() - 1; } + int getSharedCount() const noexcept override { return getReferenceCount() + image->getSharedCount() - 1; } private: friend class Image; diff --git a/modules/juce_gui_basics/application/juce_Application.h b/modules/juce_gui_basics/application/juce_Application.h index 140cf9df21..1647ce63b6 100644 --- a/modules/juce_gui_basics/application/juce_Application.h +++ b/modules/juce_gui_basics/application/juce_Application.h @@ -172,13 +172,13 @@ public: //============================================================================== /** @internal */ - ApplicationCommandTarget* getNextCommandTarget(); + ApplicationCommandTarget* getNextCommandTarget() override; /** @internal */ - void getCommandInfo (CommandID, ApplicationCommandInfo&); + void getCommandInfo (CommandID, ApplicationCommandInfo&) override; /** @internal */ - void getAllCommands (Array&); + void getAllCommands (Array&) override; /** @internal */ - bool perform (const InvocationInfo&); + bool perform (const InvocationInfo&) override; private: bool initialiseApp() override; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h index 1de9111c45..7629ef8954 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h @@ -92,15 +92,15 @@ public: //============================================================================== /** @internal */ - Drawable* createCopy() const; + Drawable* createCopy() const override; /** @internal */ - void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder); + void refreshFromValueTree (const ValueTree&, ComponentBuilder&); /** @internal */ - ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const; + ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const override; /** @internal */ static const Identifier valueTreeType; /** @internal */ - Rectangle getDrawableBounds() const; + Rectangle getDrawableBounds() const override; /** @internal */ void childBoundsChanged (Component*) override; /** @internal */ diff --git a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h index 7f074d2c6a..3e8cd907b5 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h +++ b/modules/juce_gui_basics/filebrowser/juce_FileListComponent.h @@ -56,23 +56,23 @@ public: /** Returns the number of files the user has got selected. @see getSelectedFile */ - int getNumSelectedFiles() const; + int getNumSelectedFiles() const override; /** Returns one of the files that the user has currently selected. The index should be in the range 0 to (getNumSelectedFiles() - 1). @see getNumSelectedFiles */ - File getSelectedFile (int index = 0) const; + File getSelectedFile (int index = 0) const override; /** Deselects any files that are currently selected. */ - void deselectAllFiles(); + void deselectAllFiles() override; /** Scrolls to the top of the list. */ - void scrollToTop(); + void scrollToTop() override; /** If the specified file is in the list, it will become the only selected item (and if the file isn't in the list, all other items will be deselected). */ - void setSelectedFile (const File&); + void setSelectedFile (const File&) override; private: //============================================================================== @@ -84,7 +84,7 @@ private: int getNumRows() override; void paintListBoxItem (int, Graphics&, int, int, bool) override; - Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) override; + Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override; void selectedRowsChanged (int lastRowSelected) override; void deleteKeyPressed (int currentSelectedRow) override; void returnKeyPressed (int currentSelectedRow) override; diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index 1f9389d330..75f9c1c5ff 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1240,14 +1240,14 @@ public: setLookAndFeel (&s.getLookAndFeel()); } - void paintContent (Graphics& g, int w, int h) + void paintContent (Graphics& g, int w, int h) override { g.setFont (font); g.setColour (owner.findColour (TooltipWindow::textColourId, true)); g.drawFittedText (text, Rectangle (w, h), Justification::centred, 1); } - void getContentSize (int& w, int& h) + void getContentSize (int& w, int& h) override { w = font.getStringWidth (text) + 18; h = (int) (font.getHeight() * 1.6f); diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index 45f7e88670..3962b696e6 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -36,7 +36,7 @@ public: } bool getToolbarItemSizes (int toolbarThickness, bool /*isToolbarVertical*/, - int& preferredSize, int& minSize, int& maxSize) + int& preferredSize, int& minSize, int& maxSize) override { if (fixedSize <= 0) { @@ -219,7 +219,7 @@ public: setSize (maxX + 8, y + height + 8); } - void getIdealSize (int& idealWidth, int& idealHeight) + void getIdealSize (int& idealWidth, int& idealHeight) override { idealWidth = getWidth(); idealHeight = getHeight(); diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.h b/modules/juce_gui_basics/windows/juce_DocumentWindow.h index 17457bdccc..86efd278d3 100644 --- a/modules/juce_gui_basics/windows/juce_DocumentWindow.h +++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.h @@ -100,7 +100,7 @@ public: (This is overridden from Component::setName() to cause a repaint, as the name is what gets drawn across the window's title bar). */ - void setName (const String& newName); + void setName (const String& newName) override; /** Sets an icon to show in the title bar, next to the title. diff --git a/modules/juce_gui_extra/misc/juce_ColourSelector.h b/modules/juce_gui_extra/misc/juce_ColourSelector.h index d16700cbf7..7232fd6f66 100644 --- a/modules/juce_gui_extra/misc/juce_ColourSelector.h +++ b/modules/juce_gui_extra/misc/juce_ColourSelector.h @@ -154,7 +154,7 @@ private: void setSV (float newS, float newV); void updateHSV(); void update(); - void sliderValueChanged (Slider*); + void sliderValueChanged (Slider*) override; void paint (Graphics&) override; void resized() override; diff --git a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp index 98311536b7..8a6d5b959a 100644 --- a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp +++ b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp @@ -347,8 +347,8 @@ public: owner.getMappings().removeChangeListener (this); } - bool mightContainSubItems() { return true; } - String getUniqueName() const { return "keys"; } + bool mightContainSubItems() override { return true; } + String getUniqueName() const override { return "keys"; } void changeListenerCallback (ChangeBroadcaster*) override {