From 4fc8fbaef1b9fe8dd07f9d3a2dcfe3d2e67e9f64 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 10 Jul 2013 10:22:33 +0100 Subject: [PATCH] Added some more override decorators. --- .../sources/juce_BufferingAudioSource.h | 14 ++++++------- .../sources/juce_AudioTransportSource.h | 14 ++++++------- .../format/juce_AudioFormatReaderSource.h | 12 +++++------ .../AU/juce_AU_Wrapper.mm | 4 ++-- .../juce_core/files/juce_FileInputStream.h | 10 +++++----- .../juce_core/native/juce_android_Network.cpp | 11 +++++----- .../juce_core/native/juce_linux_Network.cpp | 12 +++++------ modules/juce_core/native/juce_mac_Network.mm | 12 +++++------ .../streams/juce_BufferedInputStream.h | 12 +++++------ .../streams/juce_MemoryInputStream.h | 10 +++++----- .../juce_core/streams/juce_SubregionStream.h | 13 ++++++------ .../zip/juce_GZIPDecompressorInputStream.h | 13 ++++++------ .../contexts/juce_GraphicsContext.cpp | 2 +- .../contexts/juce_GraphicsContext.h | 2 +- .../buttons/juce_ToolbarButton.h | 20 +++++++++---------- .../components/juce_Component.cpp | 6 +++--- .../components/juce_ModalComponentManager.cpp | 8 ++++---- .../drawables/juce_Drawable.cpp | 5 +++-- .../juce_gui_basics/drawables/juce_Drawable.h | 4 ++-- .../drawables/juce_DrawableComposite.h | 2 +- .../juce_gui_basics/misc/juce_DropShadower.h | 10 +++++----- .../native/juce_mac_MainMenu.mm | 2 +- .../widgets/juce_ImageComponent.cpp | 4 ++-- .../widgets/juce_ImageComponent.h | 4 ++-- .../juce_gui_basics/widgets/juce_TextEditor.h | 2 +- .../juce_gui_basics/widgets/juce_Toolbar.cpp | 2 +- .../juce_gui_basics/widgets/juce_TreeView.cpp | 2 +- .../native/juce_ios_UIViewComponent.mm | 6 +++--- .../juce_mac_CarbonViewWrapperComponent.h | 6 +++--- .../native/juce_mac_NSViewComponent.mm | 8 ++++---- .../native/juce_win32_ActiveXComponent.cpp | 6 +++--- .../native/juce_win32_WebBrowserComponent.cpp | 6 +++--- .../juce_opengl/opengl/juce_OpenGLContext.cpp | 14 ++++++------- .../juce_mac_QuickTimeMovieComponent.mm | 2 +- .../native/juce_win32_DirectShowComponent.cpp | 8 ++++---- .../juce_win32_QuickTimeMovieComponent.cpp | 2 +- .../playback/juce_DirectShowComponent.h | 2 +- .../playback/juce_QuickTimeMovieComponent.h | 13 ++++-------- 38 files changed, 139 insertions(+), 146 deletions(-) diff --git a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h index 961e5a30c1..1fe4b80166 100644 --- a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h +++ b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h @@ -70,26 +70,26 @@ 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& bufferToFill) override; //============================================================================== /** Implements the PositionableAudioSource method. */ - void setNextReadPosition (int64 newPosition); + void setNextReadPosition (int64 newPosition) override; /** Implements the PositionableAudioSource method. */ - int64 getNextReadPosition() const; + int64 getNextReadPosition() const override; /** Implements the PositionableAudioSource method. */ - int64 getTotalLength() const { return source->getTotalLength(); } + int64 getTotalLength() const override { return source->getTotalLength(); } /** Implements the PositionableAudioSource method. */ - bool isLooping() const { return source->isLooping(); } + bool isLooping() const override { return source->isLooping(); } private: //============================================================================== diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h index d4cb5f490b..2af1f7b1a4 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.h +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.h @@ -141,26 +141,26 @@ 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& bufferToFill) override; //============================================================================== /** Implements the PositionableAudioSource method. */ - void setNextReadPosition (int64 newPosition); + void setNextReadPosition (int64 newPosition) override; /** Implements the PositionableAudioSource method. */ - int64 getNextReadPosition() const; + int64 getNextReadPosition() const override; /** Implements the PositionableAudioSource method. */ - int64 getTotalLength() const; + int64 getTotalLength() const override; /** Implements the PositionableAudioSource method. */ - bool isLooping() const; + bool isLooping() const override; private: //============================================================================== diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h index 80710ba2ca..8b77718375 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h +++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.h @@ -68,23 +68,23 @@ 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& bufferToFill) override; //============================================================================== /** Implements the PositionableAudioSource method. */ - void setNextReadPosition (int64 newPosition); + void setNextReadPosition (int64 newPosition) override; /** Implements the PositionableAudioSource method. */ - int64 getNextReadPosition() const; + int64 getNextReadPosition() const override; /** Implements the PositionableAudioSource method. */ - int64 getTotalLength() const; + int64 getTotalLength() const override; private: //============================================================================== diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 32fde2d747..fb0aae86a0 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -984,7 +984,7 @@ public: return view; } - void childBoundsChanged (Component*) + void childBoundsChanged (Component*) override { if (Component* editor = getChildComponent(0)) { @@ -1004,7 +1004,7 @@ public: } } - bool keyPressed (const KeyPress&) + bool keyPressed (const KeyPress&) override { if (PluginHostType().isAbletonLive()) { diff --git a/modules/juce_core/files/juce_FileInputStream.h b/modules/juce_core/files/juce_FileInputStream.h index 589c9e6016..ee9b624deb 100644 --- a/modules/juce_core/files/juce_FileInputStream.h +++ b/modules/juce_core/files/juce_FileInputStream.h @@ -75,11 +75,11 @@ public: //============================================================================== - int64 getTotalLength(); - int read (void* destBuffer, int maxBytesToRead); - bool isExhausted(); - int64 getPosition(); - bool setPosition (int64 pos); + int64 getTotalLength() override; + int read (void* destBuffer, int maxBytesToRead) override; + bool isExhausted() override; + int64 getPosition() override; + bool setPosition (int64 pos) override; private: //============================================================================== diff --git a/modules/juce_core/native/juce_android_Network.cpp b/modules/juce_core/native/juce_android_Network.cpp index fe5f450574..92fc2cc8e1 100644 --- a/modules/juce_core/native/juce_android_Network.cpp +++ b/modules/juce_core/native/juce_android_Network.cpp @@ -68,7 +68,6 @@ bool Process::openEmailWithAttachments (const String& targetEmailAddress, class WebInputStream : public InputStream { public: - //============================================================================== WebInputStream (String address, bool isPost, const MemoryBlock& postData, URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext, const String& headers, int timeOutMs, StringPairArray* responseHeaders) @@ -132,12 +131,12 @@ public: } //============================================================================== - bool isExhausted() { return stream != nullptr && stream.callBooleanMethod (HTTPStream.isExhausted); } - int64 getTotalLength() { return stream != nullptr ? stream.callLongMethod (HTTPStream.getTotalLength) : 0; } - int64 getPosition() { return stream != nullptr ? stream.callLongMethod (HTTPStream.getPosition) : 0; } - bool setPosition (int64 wantedPos) { return stream != nullptr && stream.callBooleanMethod (HTTPStream.setPosition, (jlong) wantedPos); } + bool isExhausted() override { return stream != nullptr && stream.callBooleanMethod (HTTPStream.isExhausted); } + int64 getTotalLength() override { return stream != nullptr ? stream.callLongMethod (HTTPStream.getTotalLength) : 0; } + int64 getPosition() override { return stream != nullptr ? stream.callLongMethod (HTTPStream.getPosition) : 0; } + bool setPosition (int64 wantedPos) override { return stream != nullptr && stream.callBooleanMethod (HTTPStream.setPosition, (jlong) wantedPos); } - int read (void* buffer, int bytesToRead) + int read (void* buffer, int bytesToRead) override { jassert (buffer != nullptr && bytesToRead >= 0); diff --git a/modules/juce_core/native/juce_linux_Network.cpp b/modules/juce_core/native/juce_linux_Network.cpp index 84805d9ae1..30badf80e7 100644 --- a/modules/juce_core/native/juce_linux_Network.cpp +++ b/modules/juce_core/native/juce_linux_Network.cpp @@ -98,17 +98,17 @@ public: } //============================================================================== - bool isError() const { return socketHandle < 0; } - bool isExhausted() { return finished; } - int64 getPosition() { return position; } + bool isError() const { return socketHandle < 0; } + bool isExhausted() override { return finished; } + int64 getPosition() override { return position; } - int64 getTotalLength() + int64 getTotalLength() override { //xxx to do return -1; } - int read (void* buffer, int bytesToRead) + int read (void* buffer, int bytesToRead) override { if (finished || isError()) return 0; @@ -131,7 +131,7 @@ public: return bytesRead; } - bool setPosition (int64 wantedPos) + bool setPosition (int64 wantedPos) override { if (isError()) return false; diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index a9611fa086..88845df36f 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -327,12 +327,12 @@ public: } //============================================================================== - bool isError() const { return connection == nullptr; } - int64 getTotalLength() { return connection == nullptr ? -1 : connection->contentLength; } - bool isExhausted() { return finished; } - int64 getPosition() { return position; } + bool isError() const { return connection == nullptr; } + int64 getTotalLength() override { return connection == nullptr ? -1 : connection->contentLength; } + bool isExhausted() override { return finished; } + int64 getPosition() override { return position; } - int read (void* buffer, int bytesToRead) + int read (void* buffer, int bytesToRead) override { jassert (buffer != nullptr && bytesToRead >= 0); @@ -351,7 +351,7 @@ public: } } - bool setPosition (int64 wantedPos) + bool setPosition (int64 wantedPos) override { if (wantedPos != position) { diff --git a/modules/juce_core/streams/juce_BufferedInputStream.h b/modules/juce_core/streams/juce_BufferedInputStream.h index b9fd2bcbf2..c9d581f024 100644 --- a/modules/juce_core/streams/juce_BufferedInputStream.h +++ b/modules/juce_core/streams/juce_BufferedInputStream.h @@ -74,12 +74,12 @@ public: //============================================================================== - int64 getTotalLength(); - int64 getPosition(); - bool setPosition (int64 newPosition); - int read (void* destBuffer, int maxBytesToRead); - String readString(); - bool isExhausted(); + int64 getTotalLength() override; + int64 getPosition() override; + bool setPosition (int64 newPosition) override; + int read (void* destBuffer, int maxBytesToRead) override; + String readString() override; + bool isExhausted() override; private: diff --git a/modules/juce_core/streams/juce_MemoryInputStream.h b/modules/juce_core/streams/juce_MemoryInputStream.h index dc7e1a21ae..8282a74e81 100644 --- a/modules/juce_core/streams/juce_MemoryInputStream.h +++ b/modules/juce_core/streams/juce_MemoryInputStream.h @@ -80,11 +80,11 @@ public: size_t getDataSize() const noexcept { return dataSize; } //============================================================================== - int64 getPosition(); - bool setPosition (int64 pos); - int64 getTotalLength(); - bool isExhausted(); - int read (void* destBuffer, int maxBytesToRead); + int64 getPosition() override; + bool setPosition (int64 pos) override; + int64 getTotalLength() override; + bool isExhausted() override; + int read (void* destBuffer, int maxBytesToRead) override; private: //============================================================================== diff --git a/modules/juce_core/streams/juce_SubregionStream.h b/modules/juce_core/streams/juce_SubregionStream.h index 58f586dcdd..e92b6e1187 100644 --- a/modules/juce_core/streams/juce_SubregionStream.h +++ b/modules/juce_core/streams/juce_SubregionStream.h @@ -74,15 +74,14 @@ public: //============================================================================== - int64 getTotalLength(); - int64 getPosition(); - bool setPosition (int64 newPosition); - int read (void* destBuffer, int maxBytesToRead); - bool isExhausted(); + int64 getTotalLength() override; + int64 getPosition() override; + bool setPosition (int64 newPosition) override; + int read (void* destBuffer, int maxBytesToRead) override; + bool isExhausted() override; - - //============================================================================== private: + //============================================================================== OptionalScopedPointer source; const int64 startPositionInSourceStream, lengthOfSourceStream; diff --git a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.h b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.h index a6f1826eee..391cac452f 100644 --- a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.h +++ b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.h @@ -75,15 +75,14 @@ public: ~GZIPDecompressorInputStream(); //============================================================================== - int64 getPosition(); - bool setPosition (int64 pos); - int64 getTotalLength(); - bool isExhausted(); - int read (void* destBuffer, int maxBytesToRead); + int64 getPosition() override; + bool setPosition (int64 pos) override; + int64 getTotalLength() override; + bool isExhausted() override; + int read (void* destBuffer, int maxBytesToRead) override; - - //============================================================================== private: + //============================================================================== OptionalScopedPointer sourceStream; const int64 uncompressedStreamLength; const bool noWrap; diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp index 06dd6d33a0..625958cca1 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.cpp +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.cpp @@ -627,7 +627,7 @@ void Graphics::drawImageAt (const Image& imageToDraw, void Graphics::drawImageWithin (const Image& imageToDraw, const int destX, const int destY, const int destW, const int destH, - const RectanglePlacement& placementWithinTarget, + RectanglePlacement placementWithinTarget, const bool fillAlphaChannelWithCurrentBrush) const { // passing in a silly number can cause maths problems in rendering! diff --git a/modules/juce_graphics/contexts/juce_GraphicsContext.h b/modules/juce_graphics/contexts/juce_GraphicsContext.h index a0ae117a7c..4109716d67 100644 --- a/modules/juce_graphics/contexts/juce_GraphicsContext.h +++ b/modules/juce_graphics/contexts/juce_GraphicsContext.h @@ -559,7 +559,7 @@ public: */ void drawImageWithin (const Image& imageToDraw, int destX, int destY, int destWidth, int destHeight, - const RectanglePlacement& placementWithinTarget, + RectanglePlacement placementWithinTarget, bool fillAlphaChannelWithCurrentBrush = false) const; diff --git a/modules/juce_gui_basics/buttons/juce_ToolbarButton.h b/modules/juce_gui_basics/buttons/juce_ToolbarButton.h index 007f8489f2..210bd8e430 100644 --- a/modules/juce_gui_basics/buttons/juce_ToolbarButton.h +++ b/modules/juce_gui_basics/buttons/juce_ToolbarButton.h @@ -54,10 +54,10 @@ public: deleted when no longer needed or when this button is deleted. @param toggledOnImage a drawable object that the button can use as its icon if the button is in a toggled-on state (see the Button::getToggleState() method). If - 0 is passed-in here, then the normal image will be used instead, regardless - of the toggle state. The object that is passed-in here will be kept by - this object and will be deleted when no longer needed or when this button - is deleted. + nullptr is passed-in here, then the normal image will be used instead, + regardless of the toggle state. The object that is passed-in here will be + owned by this object and will be deleted when no longer needed or when + this button is deleted. */ ToolbarButton (int itemId, const String& labelText, @@ -71,17 +71,17 @@ public: //============================================================================== /** @internal */ bool getToolbarItemSizes (int toolbarDepth, bool isToolbarVertical, int& preferredSize, - int& minSize, int& maxSize); + int& minSize, int& maxSize) override; /** @internal */ - void paintButtonArea (Graphics&, int width, int height, bool isMouseOver, bool isMouseDown); + void paintButtonArea (Graphics&, int width, int height, bool isMouseOver, bool isMouseDown) override; /** @internal */ - void contentAreaChanged (const Rectangle&); + void contentAreaChanged (const Rectangle&) override; /** @internal */ - void buttonStateChanged(); + void buttonStateChanged() override; /** @internal */ - void resized(); + void resized() override; /** @internal */ - void enablementChanged(); + void enablementChanged() override; private: //============================================================================== diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index abfcb49b91..871982a685 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -728,9 +728,9 @@ public: g.drawImageAt (image, 0, 0); } - void invalidateAll() { validArea.clear(); } - void invalidate (const Rectangle& area) { validArea.subtract (area); } - void releaseResources() { image = Image::null; } + void invalidateAll() override { validArea.clear(); } + void invalidate (const Rectangle& area) override { validArea.subtract (area); } + void releaseResources() override { image = Image::null; } private: Image image; diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp index fefe0f19fa..e4d8e96611 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp @@ -33,21 +33,21 @@ public: jassert (comp != nullptr); } - void componentMovedOrResized (bool, bool) {} + void componentMovedOrResized (bool, bool) override {} - void componentPeerChanged() + void componentPeerChanged() override { if (! component->isShowing()) cancel(); } - void componentVisibilityChanged() + void componentVisibilityChanged() override { if (! component->isShowing()) cancel(); } - void componentBeingDeleted (Component& comp) + void componentBeingDeleted (Component& comp) override { ComponentMovementWatcher::componentBeingDeleted (comp); diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.cpp b/modules/juce_gui_basics/drawables/juce_Drawable.cpp index 847d822e1e..e9be890fd8 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.cpp +++ b/modules/juce_gui_basics/drawables/juce_Drawable.cpp @@ -73,7 +73,8 @@ void Drawable::drawAt (Graphics& g, float x, float y, float opacity) const draw (g, opacity, AffineTransform::translation (x, y)); } -void Drawable::drawWithin (Graphics& g, const Rectangle& destArea, const RectanglePlacement& placement, float opacity) const +void Drawable::drawWithin (Graphics& g, const Rectangle& destArea, + RectanglePlacement placement, float opacity) const { draw (g, opacity, placement.getTransformToFit (getDrawableBounds(), destArea)); } @@ -113,7 +114,7 @@ void Drawable::setOriginWithOriginalSize (Point originWithinParent) setTransform (AffineTransform::translation (originWithinParent.x, originWithinParent.y)); } -void Drawable::setTransformToFit (const Rectangle& area, const RectanglePlacement& placement) +void Drawable::setTransformToFit (const Rectangle& area, RectanglePlacement placement) { if (! area.isEmpty()) setTransform (placement.getTransformToFit (getDrawableBounds(), area)); diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index 78a4cd281d..2dc4ec68d2 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -104,7 +104,7 @@ public: */ void drawWithin (Graphics& g, const Rectangle& destArea, - const RectanglePlacement& placement, + RectanglePlacement placement, float opacity) const; @@ -117,7 +117,7 @@ public: /** Sets a transform for this drawable that will position it within the specified area of its parent component. */ - void setTransformToFit (const Rectangle& areaInParent, const RectanglePlacement& placement); + void setTransformToFit (const Rectangle& areaInParent, RectanglePlacement placement); /** Returns the DrawableComposite that contains this object, if there is one. */ DrawableComposite* getParent() const; diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h index d868219c15..b82c486c0b 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h @@ -113,7 +113,7 @@ public: /** @internal */ void parentHierarchyChanged() override; /** @internal */ - MarkerList* getMarkers (bool xAxis); + MarkerList* getMarkers (bool xAxis) override; //============================================================================== /** Internally-used class for wrapping a DrawableComposite's state into a ValueTree. */ diff --git a/modules/juce_gui_basics/misc/juce_DropShadower.h b/modules/juce_gui_basics/misc/juce_DropShadower.h index e68b0649e2..00cd107532 100644 --- a/modules/juce_gui_basics/misc/juce_DropShadower.h +++ b/modules/juce_gui_basics/misc/juce_DropShadower.h @@ -66,11 +66,11 @@ private: bool reentrant; WeakReference lastParentComp; - void componentMovedOrResized (Component&, bool, bool); - void componentBroughtToFront (Component&); - void componentChildrenChanged (Component&); - void componentParentHierarchyChanged (Component&); - void componentVisibilityChanged (Component&); + void componentMovedOrResized (Component&, bool, bool) override; + void componentBroughtToFront (Component&) override; + void componentChildrenChanged (Component&) override; + void componentParentHierarchyChanged (Component&) override; + void componentVisibilityChanged (Component&) override; void updateParent(); void updateShadows(); diff --git a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm index b9022c6d41..1438ecb89e 100644 --- a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm +++ b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm @@ -599,7 +599,7 @@ private: { public: SilentDummyModalComp() {} - void inputAttemptWhenModal() {} + void inputAttemptWhenModal() override {} }; SilentDummyModalComp dummyModalComponent; diff --git a/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp b/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp index 90e6a5d17f..37df8e1fff 100644 --- a/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp +++ b/modules/juce_gui_basics/widgets/juce_ImageComponent.cpp @@ -41,7 +41,7 @@ void ImageComponent::setImage (const Image& newImage) } } -void ImageComponent::setImage (const Image& newImage, const RectanglePlacement& placementToUse) +void ImageComponent::setImage (const Image& newImage, RectanglePlacement placementToUse) { if (image != newImage || placement != placementToUse) { @@ -51,7 +51,7 @@ void ImageComponent::setImage (const Image& newImage, const RectanglePlacement& } } -void ImageComponent::setImagePlacement (const RectanglePlacement& newPlacement) +void ImageComponent::setImagePlacement (RectanglePlacement newPlacement) { if (placement != newPlacement) { diff --git a/modules/juce_gui_basics/widgets/juce_ImageComponent.h b/modules/juce_gui_basics/widgets/juce_ImageComponent.h index 186fde6ebe..f4df479c49 100644 --- a/modules/juce_gui_basics/widgets/juce_ImageComponent.h +++ b/modules/juce_gui_basics/widgets/juce_ImageComponent.h @@ -52,7 +52,7 @@ public: /** Sets the image that should be displayed, and its placement within the component. */ void setImage (const Image& newImage, - const RectanglePlacement& placementToUse); + RectanglePlacement placementToUse); /** Returns the current image. */ const Image& getImage() const; @@ -61,7 +61,7 @@ public: By default the positioning is centred, and will fit the image inside the component's bounds whilst keeping its aspect ratio correct, but you can change it to whatever layout you need. */ - void setImagePlacement (const RectanglePlacement& newPlacement); + void setImagePlacement (RectanglePlacement newPlacement); /** Returns the current image placement. */ RectanglePlacement getImagePlacement() const; diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.h b/modules/juce_gui_basics/widgets/juce_TextEditor.h index 7824851058..3ae71a37e0 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.h +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.h @@ -694,7 +694,7 @@ private: void moveCaret (int newCaretPos); void moveCaretTo (int newPosition, bool isSelecting); - void handleCommandMessage (int); + void handleCommandMessage (int) override; void coalesceSimilarSections(); void splitSection (int sectionIndex, int charToSplitAt); void clearInternal (UndoManager*); diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index c6d36c032b..c79e3063e7 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -657,7 +657,7 @@ public: setVisible (false); } - bool canModalEventBeSentToComponent (const Component* comp) + bool canModalEventBeSentToComponent (const Component* comp) override { return toolbar->isParentOf (comp); } diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.cpp b/modules/juce_gui_basics/widgets/juce_TreeView.cpp index 06d212281c..4b09fc3c19 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.cpp +++ b/modules/juce_gui_basics/widgets/juce_TreeView.cpp @@ -409,7 +409,7 @@ public: repaint(); } - void visibleAreaChanged (const Rectangle& newVisibleArea) + void visibleAreaChanged (const Rectangle& newVisibleArea) override { const bool hasScrolledSideways = (newVisibleArea.getX() != lastX); lastX = newVisibleArea.getX(); diff --git a/modules/juce_gui_extra/native/juce_ios_UIViewComponent.mm b/modules/juce_gui_extra/native/juce_ios_UIViewComponent.mm index 1764b6a1fa..257cd8c2d4 100644 --- a/modules/juce_gui_extra/native/juce_ios_UIViewComponent.mm +++ b/modules/juce_gui_extra/native/juce_ios_UIViewComponent.mm @@ -43,7 +43,7 @@ public: [view release]; } - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { Component* const topComp = owner.getTopLevelComponent(); @@ -56,7 +56,7 @@ public: } } - void componentPeerChanged() + void componentPeerChanged() override { ComponentPeer* const peer = owner.getPeer(); @@ -78,7 +78,7 @@ public: [view setHidden: ! owner.isShowing()]; } - void componentVisibilityChanged() + void componentVisibilityChanged() override { componentPeerChanged(); } diff --git a/modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h b/modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h index 3b477aba30..eb53bf3a85 100644 --- a/modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h +++ b/modules/juce_gui_extra/native/juce_mac_CarbonViewWrapperComponent.h @@ -219,18 +219,18 @@ public: } } - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { setEmbeddedWindowToOurSize(); } - void componentPeerChanged() + void componentPeerChanged() override { deleteWindow(); createWindow(); } - void componentVisibilityChanged() + void componentVisibilityChanged() override { if (isShowing()) createWindow(); diff --git a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm index e35b649248..5362cf19d3 100644 --- a/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm @@ -44,7 +44,7 @@ public: [view release]; } - void componentMovedOrResized (Component& comp, bool wasMoved, bool wasResized) + void componentMovedOrResized (Component& comp, bool wasMoved, bool wasResized) override { ComponentMovementWatcher::componentMovedOrResized (comp, wasMoved, wasResized); @@ -56,7 +56,7 @@ public: componentMovedOrResized (wasMoved, wasResized); } - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { Component* const topComp = owner.getTopLevelComponent(); @@ -70,7 +70,7 @@ public: } } - void componentPeerChanged() + void componentPeerChanged() override { ComponentPeer* const peer = owner.getPeer(); @@ -90,7 +90,7 @@ public: [view setHidden: ! owner.isShowing()]; } - void componentVisibilityChanged() + void componentVisibilityChanged() override { componentPeerChanged(); } diff --git a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp index 2a3f6bf361..bb39d3add4 100644 --- a/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp @@ -238,7 +238,7 @@ public: } //============================================================================== - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { Component* const topComp = owner.getTopLevelComponent(); @@ -246,12 +246,12 @@ public: setControlBounds (topComp->getLocalArea (&owner, owner.getLocalBounds())); } - void componentPeerChanged() + void componentPeerChanged() override { componentMovedOrResized (true, true); } - void componentVisibilityChanged() + void componentVisibilityChanged() override { setControlVisible (owner.isShowing()); componentPeerChanged(); diff --git a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp index 66971664b9..3b40c500c5 100644 --- a/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp +++ b/modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp @@ -162,9 +162,9 @@ private: return E_NOTIMPL; } - void componentMovedOrResized (bool, bool ) {} - void componentPeerChanged() {} - void componentVisibilityChanged() { owner.visibilityChanged(); } + void componentMovedOrResized (bool, bool) override {} + void componentPeerChanged() override {} + void componentVisibilityChanged() override { owner.visibilityChanged(); } private: WebBrowserComponent& owner; diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index f82af00a2f..2726f2043e 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -75,19 +75,19 @@ public: peer->addMaskedRegion (peer->getComponent().getLocalArea (&component, component.getLocalBounds())); } - void invalidateAll() + void invalidateAll() override { validArea.clear(); triggerRepaint(); } - void invalidate (const Rectangle& area) + void invalidate (const Rectangle& area) override { validArea.subtract (area); triggerRepaint(); } - void releaseResources() {} + void releaseResources() override {} void triggerRepaint() { @@ -416,7 +416,7 @@ public: detach(); } - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { Component& comp = *getComponent(); @@ -434,13 +434,13 @@ public: } } - void componentPeerChanged() + void componentPeerChanged() override { detach(); componentVisibilityChanged(); } - void componentVisibilityChanged() + void componentVisibilityChanged() override { Component& comp = *getComponent(); @@ -456,7 +456,7 @@ public: } #if JUCE_DEBUG || JUCE_LOG_ASSERTIONS - void componentBeingDeleted (Component& component) + void componentBeingDeleted (Component& component) override { /* You must call detach() or delete your OpenGLContext to remove it from a component BEFORE deleting the component that it is using! diff --git a/modules/juce_video/native/juce_mac_QuickTimeMovieComponent.mm b/modules/juce_video/native/juce_mac_QuickTimeMovieComponent.mm index d2afbdb9a0..504ada88bb 100644 --- a/modules/juce_video/native/juce_mac_QuickTimeMovieComponent.mm +++ b/modules/juce_video/native/juce_mac_QuickTimeMovieComponent.mm @@ -306,7 +306,7 @@ void QuickTimeMovieComponent::goToStart() } void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - const RectanglePlacement& placement) + RectanglePlacement placement) { int normalWidth, normalHeight; getMovieNormalSize (normalWidth, normalHeight); diff --git a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp b/modules/juce_video/native/juce_win32_DirectShowComponent.cpp index 09011a0dd0..8fef860778 100644 --- a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp +++ b/modules/juce_video/native/juce_win32_DirectShowComponent.cpp @@ -734,19 +734,19 @@ public: { } - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override { if (owner->videoLoaded) owner->updateContextPosition(); } - void componentPeerChanged() + void componentPeerChanged() override { if (owner->videoLoaded) owner->recreateNativeWindowAsync(); } - void componentVisibilityChanged() + void componentVisibilityChanged() override { if (owner->videoLoaded) owner->showContext (owner->isShowing()); @@ -869,7 +869,7 @@ void DirectShowComponent::getMovieNormalSize (int &width, int &height) const //====================================================================== void DirectShowComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - const RectanglePlacement& placement) + RectanglePlacement placement) { int normalWidth, normalHeight; getMovieNormalSize (normalWidth, normalHeight); diff --git a/modules/juce_video/native/juce_win32_QuickTimeMovieComponent.cpp b/modules/juce_video/native/juce_win32_QuickTimeMovieComponent.cpp index 2b28b0d2fe..ecda416857 100644 --- a/modules/juce_video/native/juce_win32_QuickTimeMovieComponent.cpp +++ b/modules/juce_video/native/juce_win32_QuickTimeMovieComponent.cpp @@ -469,7 +469,7 @@ void QuickTimeMovieComponent::goToStart() } void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - const RectanglePlacement& placement) + RectanglePlacement placement) { int normalWidth, normalHeight; getMovieNormalSize (normalWidth, normalHeight); diff --git a/modules/juce_video/playback/juce_DirectShowComponent.h b/modules/juce_video/playback/juce_DirectShowComponent.h index 78849256dc..5d537a134d 100644 --- a/modules/juce_video/playback/juce_DirectShowComponent.h +++ b/modules/juce_video/playback/juce_DirectShowComponent.h @@ -135,7 +135,7 @@ public: @note Not implemented */ void setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - const RectanglePlacement& placement); + RectanglePlacement placement); /** Starts the video playing. */ void play(); diff --git a/modules/juce_video/playback/juce_QuickTimeMovieComponent.h b/modules/juce_video/playback/juce_QuickTimeMovieComponent.h index dbc63ff0c1..6c38808d45 100644 --- a/modules/juce_video/playback/juce_QuickTimeMovieComponent.h +++ b/modules/juce_video/playback/juce_QuickTimeMovieComponent.h @@ -139,7 +139,7 @@ public: the top or sides. */ void setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin, - const RectanglePlacement& placement); + RectanglePlacement placement); /** Starts the movie playing. */ void play(); @@ -167,13 +167,11 @@ public: void setSpeed (float newSpeed); /** Changes the movie's playback volume. - @param newVolume the volume in the range 0 (silent) to 1.0 (full) */ void setMovieVolume (float newVolume); /** Returns the movie's playback volume. - @returns the volume in the range 0 (silent) to 1.0 (full) */ float getMovieVolume() const; @@ -182,13 +180,11 @@ public: void setLooping (bool shouldLoop); /** Returns true if the movie is currently looping. - @see setLooping */ bool isLooping() const; /** True if the native QuickTime controller bar is shown in the window. - @see loadMovie */ bool isControllerVisible() const; @@ -204,19 +200,18 @@ private: File movieFile; bool movieLoaded, controllerVisible, looping; -#if JUCE_WINDOWS + #if JUCE_WINDOWS void parentHierarchyChanged() override; void visibilityChanged() override; - void createControlIfNeeded(); bool isControlCreated() const; class Pimpl; friend class ScopedPointer ; ScopedPointer pimpl; -#else + #else void* movie; -#endif + #endif JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (QuickTimeMovieComponent) };