From 50132270d638d0c5992bae08d9f3d6df3ce896f3 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 22 Aug 2013 22:03:51 +0100 Subject: [PATCH] Added a few override modifiers and fixed some documentation. --- .../sources/juce_BufferingAudioSource.h | 2 +- .../juce_ChannelRemappingAudioSource.h | 13 +++++-------- .../sources/juce_IIRFilterAudioSource.h | 8 ++++---- .../sources/juce_MixerAudioSource.h | 8 ++++---- .../sources/juce_ResamplingAudioSource.h | 6 +++--- .../sources/juce_ReverbAudioSource.h | 6 +++--- .../sources/juce_ToneGeneratorAudioSource.h | 6 +++--- .../sources/juce_AudioTransportSource.h | 2 +- .../format/juce_AudioFormatReaderSource.h | 2 +- .../juce_gui_basics/widgets/juce_ListBox.h | 19 ++++--------------- 10 files changed, 29 insertions(+), 43 deletions(-) diff --git a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h index 4fbdfda301..f54451a15a 100644 --- a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h @@ -76,7 +76,7 @@ public: void releaseResources() override; /** Implementation of the AudioSource method. */ - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; //============================================================================== /** Implements the PositionableAudioSource method. */ diff --git a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h index a26fa98cc9..f6da255dfe 100644 --- a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h @@ -113,32 +113,29 @@ public: //============================================================================== /** Returns an XML object to encapsulate the state of the mappings. - @see restoreFromXml */ XmlElement* createXml() const; /** Restores the mappings from an XML object created by createXML(). - @see createXml */ - void restoreFromXml (const XmlElement& e); + void restoreFromXml (const XmlElement&); //============================================================================== - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); - void releaseResources(); - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; + void releaseResources() override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: //============================================================================== OptionalScopedPointer source; - Array remappedInputs, remappedOutputs; + Array remappedInputs, remappedOutputs; int requiredNumberOfChannels; AudioSampleBuffer buffer; AudioSourceChannelInfo remappedInfo; - CriticalSection lock; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelRemappingAudioSource) diff --git a/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h b/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h index 5c34c8dc5f..b70b844ca6 100644 --- a/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h @@ -57,14 +57,14 @@ public: void makeInactive(); //============================================================================== - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); - void releaseResources(); - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; + void releaseResources() override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: //============================================================================== OptionalScopedPointer input; - OwnedArray iirFilters; + OwnedArray iirFilters; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IIRFilterAudioSource) }; diff --git a/modules/juce_audio_basics/sources/juce_MixerAudioSource.h b/modules/juce_audio_basics/sources/juce_MixerAudioSource.h index 2cb68fde3e..2eb9755789 100644 --- a/modules/juce_audio_basics/sources/juce_MixerAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_MixerAudioSource.h @@ -76,20 +76,20 @@ public: /** Implementation of the AudioSource method. This will call prepareToPlay() on all its input sources. */ - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; /** Implementation of the AudioSource method. This will call releaseResources() on all its input sources. */ - void releaseResources(); + void releaseResources() override; /** Implementation of the AudioSource method. */ - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: //============================================================================== - Array inputs; + Array inputs; BigInteger inputsToDelete; CriticalSection lock; AudioSampleBuffer tempBuffer; diff --git a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h index a4dadab9b5..7c78db8ff0 100644 --- a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h @@ -69,9 +69,9 @@ public: double getResamplingRatio() const noexcept { return ratio; } //============================================================================== - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); - void releaseResources(); - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; + void releaseResources() override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: //============================================================================== diff --git a/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h b/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h index dab1f0eed1..1173cf6649 100644 --- a/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h @@ -61,9 +61,9 @@ public: bool isBypassed() const noexcept { return bypass; } //============================================================================== - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); - void releaseResources(); - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; + void releaseResources() override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: //============================================================================== diff --git a/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h b/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h index 2f04290521..aa029704ff 100644 --- a/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h @@ -53,13 +53,13 @@ public: //============================================================================== /** Implementation of the AudioSource method. */ - void prepareToPlay (int samplesPerBlockExpected, double sampleRate); + void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override; /** Implementation of the AudioSource method. */ - void releaseResources(); + void releaseResources() override; /** Implementation of the AudioSource method. */ - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill); + void getNextAudioBlock (const AudioSourceChannelInfo&) override; private: diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h index 316cf2d001..e63fa0d540 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h @@ -147,7 +147,7 @@ public: void releaseResources() override; /** Implementation of the AudioSource method. */ - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; //============================================================================== /** Implements the PositionableAudioSource method. */ diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h index 0334350888..d7ff5f7844 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h @@ -74,7 +74,7 @@ public: void releaseResources() override; /** Implementation of the AudioSource method. */ - void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override; + void getNextAudioBlock (const AudioSourceChannelInfo&) override; //============================================================================== /** Implements the PositionableAudioSource method. */ diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.h b/modules/juce_gui_basics/widgets/juce_ListBox.h index 7d532cb0a2..e1453345e5 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.h +++ b/modules/juce_gui_basics/widgets/juce_ListBox.h @@ -43,13 +43,11 @@ public: //============================================================================== /** This has to return the number of items in the list. - @see ListBox::getNumRows() */ virtual int getNumRows() = 0; - /** This method must be implemented to draw a row of the list. - */ + /** This method must be implemented to draw a row of the list. */ virtual void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, @@ -86,20 +84,17 @@ public: Component* existingComponentToUpdate); /** This can be overridden to react to the user clicking on a row. - @see listBoxItemDoubleClicked */ virtual void listBoxItemClicked (int row, const MouseEvent& e); /** This can be overridden to react to the user double-clicking on a row. - @see listBoxItemClicked */ virtual void listBoxItemDoubleClicked (int row, const MouseEvent& e); - /** This can be overridden to react to the user double-clicking on a part of the list where + /** This can be overridden to react to the user clicking on a part of the list where there are no rows. - @see listBoxItemClicked */ virtual void backgroundClicked(); @@ -253,21 +248,17 @@ public: int lastRow); /** Deselects a row. - If it's not currently selected, this will do nothing. - @see selectRow, deselectAllRows */ void deselectRow (int rowNumber); /** Deselects any currently selected rows. - @see deselectRow */ void deselectAllRows(); /** Selects or deselects a row. - If the row's currently selected, this deselects it, and vice-versa. */ void flipRowSelection (int rowNumber); @@ -292,7 +283,6 @@ public: bool isRowSelected (int rowNumber) const; /** Returns the number of rows that are currently selected. - @see getSelectedRow, isRowSelected, getLastRowSelected */ int getNumSelectedRows() const; @@ -357,8 +347,7 @@ public: */ double getVerticalPosition() const; - /** Scrolls if necessary to make sure that a particular row is visible. - */ + /** Scrolls if necessary to make sure that a particular row is visible. */ void scrollToEnsureRowIsOnscreen (int row); /** Returns a pointer to the vertical scrollbar. */ @@ -560,7 +549,7 @@ private: int outlineThickness; int lastRowSelected; bool multipleSelection, hasDoneInitialUpdate; - SparseSet selected; + SparseSet selected; void selectRowInternal (int rowNumber, bool dontScrollToShowThisRow, bool deselectOthersFirst, bool isMouseClick);