Browse Source

Added some missing 'override' decorators

tags/2021-05-28
jules 10 years ago
parent
commit
06c1a15496
18 changed files with 37 additions and 37 deletions
  1. +2
    -2
      extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h
  2. +2
    -2
      modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h
  3. +1
    -1
      modules/juce_audio_formats/sampler/juce_Sampler.h
  4. +1
    -1
      modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h
  5. +1
    -1
      modules/juce_core/streams/juce_MemoryOutputStream.h
  6. +1
    -1
      modules/juce_core/zip/juce_GZIPCompressorOutputStream.h
  7. +1
    -1
      modules/juce_data_structures/app_properties/juce_PropertiesFile.h
  8. +2
    -2
      modules/juce_data_structures/values/juce_Value.cpp
  9. +2
    -2
      modules/juce_data_structures/values/juce_ValueTree.cpp
  10. +2
    -2
      modules/juce_graphics/images/juce_Image.cpp
  11. +4
    -4
      modules/juce_gui_basics/application/juce_Application.h
  12. +4
    -4
      modules/juce_gui_basics/drawables/juce_DrawableComposite.h
  13. +6
    -6
      modules/juce_gui_basics/filebrowser/juce_FileListComponent.h
  14. +2
    -2
      modules/juce_gui_basics/widgets/juce_Slider.cpp
  15. +2
    -2
      modules/juce_gui_basics/widgets/juce_Toolbar.cpp
  16. +1
    -1
      modules/juce_gui_basics/windows/juce_DocumentWindow.h
  17. +1
    -1
      modules/juce_gui_extra/misc/juce_ColourSelector.h
  18. +2
    -2
      modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp

+ 2
- 2
extras/Introjucer/Source/ComponentEditor/components/jucer_TreeViewHandler.h View File

@@ -130,7 +130,7 @@ private:
addSubItem (new DemoTreeViewItem ("Demo sub-node " + String (i), numItems - 1)); 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()) if (isSelected())
g.fillAll (Colours::lightblue); g.fillAll (Colours::lightblue);
@@ -140,7 +140,7 @@ private:
g.drawText (name, 4, 0, width - 4, height, Justification::centredLeft, true); g.drawText (name, 4, 0, width - 4, height, Justification::centredLeft, true);
} }
bool mightContainSubItems()
bool mightContainSubItems() override
{ {
return true; return true;
} }


+ 2
- 2
modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h View File

@@ -58,10 +58,10 @@ public:
@see isLooping @see isLooping
*/ */
void setLooping (bool shouldLoop);
void setLooping (bool shouldLoop) override;
/** Returns whether loop-mode is turned on or not. */ /** 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. */ /** Returns the reader that's being used. */
AudioFormatReader* getAudioFormatReader() const noexcept { return reader; } AudioFormatReader* getAudioFormatReader() const noexcept { return reader; }


+ 1
- 1
modules/juce_audio_formats/sampler/juce_Sampler.h View File

@@ -126,7 +126,7 @@ public:
void startNote (int midiNoteNumber, float velocity, SynthesiserSound*, int pitchWheel) override; void startNote (int midiNoteNumber, float velocity, SynthesiserSound*, int pitchWheel) override;
void stopNote (float velocity, bool allowTailOff) 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 controllerMoved (int controllerNumber, int newValue) override;
void renderNextBlock (AudioSampleBuffer&, int startSample, int numSamples) override; void renderNextBlock (AudioSampleBuffer&, int startSample, int numSamples) override;


+ 1
- 1
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h View File

@@ -308,7 +308,7 @@ public:
void fillInPluginDescription (PluginDescription&) const override; void fillInPluginDescription (PluginDescription&) const override;
void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) override; void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) override;
void releaseResources() override; void releaseResources() override;
void processBlock (AudioSampleBuffer&, MidiBuffer&);
void processBlock (AudioSampleBuffer&, MidiBuffer&) override;
const String getInputChannelName (int channelIndex) const override; const String getInputChannelName (int channelIndex) const override;
const String getOutputChannelName (int channelIndex) const override; const String getOutputChannelName (int channelIndex) const override;


+ 1
- 1
modules/juce_core/streams/juce_MemoryOutputStream.h View File

@@ -111,7 +111,7 @@ public:
capacity off the block, so that its length matches the amount of actual data that capacity off the block, so that its length matches the amount of actual data that
has been written so far. has been written so far.
*/ */
void flush();
void flush() override;
bool write (const void*, size_t) override; bool write (const void*, size_t) override;
int64 getPosition() override { return (int64) position; } int64 getPosition() override { return (int64) position; }


+ 1
- 1
modules/juce_core/zip/juce_GZIPCompressorOutputStream.h View File

@@ -72,7 +72,7 @@ public:
the stream is closed - this means that no more data can be written to it, and any 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. subsequent attempts to call write() will cause an assertion.
*/ */
void flush();
void flush() override;
int64 getPosition() override; int64 getPosition() override;
bool setPosition (int64) override; bool setPosition (int64) override;


+ 1
- 1
modules/juce_data_structures/app_properties/juce_PropertiesFile.h View File

@@ -223,7 +223,7 @@ public:
protected: protected:
/** @internal */ /** @internal */
virtual void propertyChanged();
void propertyChanged() override;
private: private:
//============================================================================== //==============================================================================


+ 2
- 2
modules/juce_data_structures/values/juce_Value.cpp View File

@@ -72,12 +72,12 @@ public:
{ {
} }
var getValue() const
var getValue() const override
{ {
return value; return value;
} }
void setValue (const var& newValue)
void setValue (const var& newValue) override
{ {
if (! newValue.equalsWithSameType (value)) if (! newValue.equalsWithSameType (value))
{ {


+ 2
- 2
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -814,8 +814,8 @@ public:
tree.removeListener (this); 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: private:
ValueTree tree; ValueTree tree;


+ 2
- 2
modules/juce_graphics/images/juce_Image.cpp View File

@@ -182,10 +182,10 @@ public:
return newImage.getPixelData(); 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 */ /* 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: private:
friend class Image; friend class Image;


+ 4
- 4
modules/juce_gui_basics/application/juce_Application.h View File

@@ -172,13 +172,13 @@ public:
//============================================================================== //==============================================================================
/** @internal */ /** @internal */
ApplicationCommandTarget* getNextCommandTarget();
ApplicationCommandTarget* getNextCommandTarget() override;
/** @internal */ /** @internal */
void getCommandInfo (CommandID, ApplicationCommandInfo&);
void getCommandInfo (CommandID, ApplicationCommandInfo&) override;
/** @internal */ /** @internal */
void getAllCommands (Array<CommandID>&);
void getAllCommands (Array<CommandID>&) override;
/** @internal */ /** @internal */
bool perform (const InvocationInfo&);
bool perform (const InvocationInfo&) override;
private: private:
bool initialiseApp() override; bool initialiseApp() override;


+ 4
- 4
modules/juce_gui_basics/drawables/juce_DrawableComposite.h View File

@@ -92,15 +92,15 @@ public:
//============================================================================== //==============================================================================
/** @internal */ /** @internal */
Drawable* createCopy() const;
Drawable* createCopy() const override;
/** @internal */ /** @internal */
void refreshFromValueTree (const ValueTree& tree, ComponentBuilder& builder);
void refreshFromValueTree (const ValueTree&, ComponentBuilder&);
/** @internal */ /** @internal */
ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const;
ValueTree createValueTree (ComponentBuilder::ImageProvider* imageProvider) const override;
/** @internal */ /** @internal */
static const Identifier valueTreeType; static const Identifier valueTreeType;
/** @internal */ /** @internal */
Rectangle<float> getDrawableBounds() const;
Rectangle<float> getDrawableBounds() const override;
/** @internal */ /** @internal */
void childBoundsChanged (Component*) override; void childBoundsChanged (Component*) override;
/** @internal */ /** @internal */


+ 6
- 6
modules/juce_gui_basics/filebrowser/juce_FileListComponent.h View File

@@ -56,23 +56,23 @@ public:
/** Returns the number of files the user has got selected. /** Returns the number of files the user has got selected.
@see getSelectedFile @see getSelectedFile
*/ */
int getNumSelectedFiles() const;
int getNumSelectedFiles() const override;
/** Returns one of the files that the user has currently selected. /** Returns one of the files that the user has currently selected.
The index should be in the range 0 to (getNumSelectedFiles() - 1). The index should be in the range 0 to (getNumSelectedFiles() - 1).
@see getNumSelectedFiles @see getNumSelectedFiles
*/ */
File getSelectedFile (int index = 0) const;
File getSelectedFile (int index = 0) const override;
/** Deselects any files that are currently selected. */ /** Deselects any files that are currently selected. */
void deselectAllFiles();
void deselectAllFiles() override;
/** Scrolls to the top of the list. */ /** 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 /** 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). */ (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: private:
//============================================================================== //==============================================================================
@@ -84,7 +84,7 @@ private:
int getNumRows() override; int getNumRows() override;
void paintListBoxItem (int, Graphics&, int, int, bool) 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 selectedRowsChanged (int lastRowSelected) override;
void deleteKeyPressed (int currentSelectedRow) override; void deleteKeyPressed (int currentSelectedRow) override;
void returnKeyPressed (int currentSelectedRow) override; void returnKeyPressed (int currentSelectedRow) override;


+ 2
- 2
modules/juce_gui_basics/widgets/juce_Slider.cpp View File

@@ -1240,14 +1240,14 @@ public:
setLookAndFeel (&s.getLookAndFeel()); setLookAndFeel (&s.getLookAndFeel());
} }
void paintContent (Graphics& g, int w, int h)
void paintContent (Graphics& g, int w, int h) override
{ {
g.setFont (font); g.setFont (font);
g.setColour (owner.findColour (TooltipWindow::textColourId, true)); g.setColour (owner.findColour (TooltipWindow::textColourId, true));
g.drawFittedText (text, Rectangle<int> (w, h), Justification::centred, 1); g.drawFittedText (text, Rectangle<int> (w, h), Justification::centred, 1);
} }
void getContentSize (int& w, int& h)
void getContentSize (int& w, int& h) override
{ {
w = font.getStringWidth (text) + 18; w = font.getStringWidth (text) + 18;
h = (int) (font.getHeight() * 1.6f); h = (int) (font.getHeight() * 1.6f);


+ 2
- 2
modules/juce_gui_basics/widgets/juce_Toolbar.cpp View File

@@ -36,7 +36,7 @@ public:
} }
bool getToolbarItemSizes (int toolbarThickness, bool /*isToolbarVertical*/, bool getToolbarItemSizes (int toolbarThickness, bool /*isToolbarVertical*/,
int& preferredSize, int& minSize, int& maxSize)
int& preferredSize, int& minSize, int& maxSize) override
{ {
if (fixedSize <= 0) if (fixedSize <= 0)
{ {
@@ -219,7 +219,7 @@ public:
setSize (maxX + 8, y + height + 8); setSize (maxX + 8, y + height + 8);
} }
void getIdealSize (int& idealWidth, int& idealHeight)
void getIdealSize (int& idealWidth, int& idealHeight) override
{ {
idealWidth = getWidth(); idealWidth = getWidth();
idealHeight = getHeight(); idealHeight = getHeight();


+ 1
- 1
modules/juce_gui_basics/windows/juce_DocumentWindow.h View File

@@ -100,7 +100,7 @@ public:
(This is overridden from Component::setName() to cause a repaint, as (This is overridden from Component::setName() to cause a repaint, as
the name is what gets drawn across the window's title bar). 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. /** Sets an icon to show in the title bar, next to the title.


+ 1
- 1
modules/juce_gui_extra/misc/juce_ColourSelector.h View File

@@ -154,7 +154,7 @@ private:
void setSV (float newS, float newV); void setSV (float newS, float newV);
void updateHSV(); void updateHSV();
void update(); void update();
void sliderValueChanged (Slider*);
void sliderValueChanged (Slider*) override;
void paint (Graphics&) override; void paint (Graphics&) override;
void resized() override; void resized() override;


+ 2
- 2
modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp View File

@@ -347,8 +347,8 @@ public:
owner.getMappings().removeChangeListener (this); 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 void changeListenerCallback (ChangeBroadcaster*) override
{ {


Loading…
Cancel
Save