diff --git a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h index beddafa8c5..def8a6d6ea 100644 --- a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h +++ b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.h @@ -86,29 +86,29 @@ public: void fillWithBackgroundTexture (Graphics&); static void fillWithBackgroundTexture (Component&, Graphics&); - int getTabButtonOverlap (int tabDepth); - int getTabButtonSpaceAroundImage(); - int getTabButtonBestWidth (TabBarButton& button, int tabDepth); + int getTabButtonOverlap (int tabDepth) override; + int getTabButtonSpaceAroundImage() override; + int getTabButtonBestWidth (TabBarButton& button, int tabDepth) override; static Colour getTabBackgroundColour (TabBarButton& button); - void drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown); + void drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown) override; - Rectangle getTabButtonExtraComponentBounds (const TabBarButton& button, Rectangle& textArea, Component& comp); - void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int, int) {} + Rectangle getTabButtonExtraComponentBounds (const TabBarButton& button, Rectangle& textArea, Component& comp) override; + void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int, int) override {} - void drawStretchableLayoutResizerBar (Graphics& g, int /*w*/, int /*h*/, bool /*isVerticalBar*/, bool isMouseOver, bool isMouseDragging); - Rectangle getPropertyComponentContentPosition (PropertyComponent&); + void drawStretchableLayoutResizerBar (Graphics& g, int /*w*/, int /*h*/, bool /*isVerticalBar*/, bool isMouseOver, bool isMouseDragging) override; + Rectangle getPropertyComponentContentPosition (PropertyComponent&) override; - bool areScrollbarButtonsVisible() { return false; } + bool areScrollbarButtonsVisible() override { return false; } void drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height, bool isScrollbarVertical, - int thumbStartPosition, int thumbSize, bool /*isMouseOver*/, bool /*isMouseDown*/); + int thumbStartPosition, int thumbSize, bool /*isMouseOver*/, bool /*isMouseDown*/) override; void drawConcertinaPanelHeader (Graphics& g, const Rectangle& area, bool isMouseOver, bool isMouseDown, - ConcertinaPanel& concertina, Component& panel); + ConcertinaPanel& concertina, Component& panel) override; void drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour, - bool isMouseOverButton, bool isButtonDown); + bool isMouseOverButton, bool isButtonDown) override; static Colour getScrollbarColourForBackground (Colour background); diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h index 48fe5fed08..6240da6325 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_ImageButtonHandler.h @@ -412,8 +412,8 @@ public: SetImageColourAction (ImageButton* const button, ComponentLayout& layout_, const ImageRole role_, - const Colour& newState_) - : ComponentUndoableAction (button, layout_), + Colour newState_) + : ComponentUndoableAction (button, layout_), role (role_), newState (newState_), layout (layout_) @@ -446,7 +446,8 @@ public: return Colour::fromString (button->getProperties().getWithDefault ("imageColour" + String ((int) role), "0").toString()); } - static void setImageColour (ComponentLayout& layout, ImageButton* button, const ImageRole role, const Colour& colour, const bool undoable) + static void setImageColour (ComponentLayout& layout, ImageButton* button, + const ImageRole role, Colour colour, const bool undoable) { if (undoable) { @@ -479,7 +480,7 @@ public: layout.getDocument()->removeChangeListener (this); } - void setColour (const Colour& newColour) + void setColour (Colour newColour) { setImageColour (layout, owner, role, newColour, true); } diff --git a/extras/Introjucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h b/extras/Introjucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h index 41b2742786..d207e88e6f 100644 --- a/extras/Introjucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h +++ b/extras/Introjucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h @@ -802,7 +802,7 @@ private: document.removeChangeListener (this); } - void setColour (const Colour& newColour) + void setColour (Colour newColour) override { document.getUndoManager().undoCurrentTransactionOnly(); @@ -810,17 +810,17 @@ private: "Change tab colour"); } - Colour getColour() const + Colour getColour() const override { return component->getTabBackgroundColour (tabIndex); } - void resetToDefault() + void resetToDefault() override { jassertfalse; // shouldn't get called } - void changeListenerCallback (ChangeBroadcaster*) { refresh(); } + void changeListenerCallback (ChangeBroadcaster*) override { refresh(); } private: TabbedComponent* component; @@ -830,7 +830,8 @@ private: class TabColourChangeAction : public ComponentUndoableAction { public: - TabColourChangeAction (TabbedComponent* const comp, ComponentLayout& layout, const int tabIndex_, const Colour& newValue_) + TabColourChangeAction (TabbedComponent* comp, ComponentLayout& layout, + int tabIndex_, Colour newValue_) : ComponentUndoableAction (comp, layout), tabIndex (tabIndex_), newValue (newValue_) diff --git a/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.cpp b/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.cpp index 1eaf9953f3..b3c9ae2ea9 100644 --- a/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.cpp +++ b/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.cpp @@ -64,7 +64,7 @@ bool PaintRoutine::perform (UndoableAction* action, const String& actionName) return false; } -void PaintRoutine::setBackgroundColour (const Colour& newColour) noexcept +void PaintRoutine::setBackgroundColour (Colour newColour) noexcept { backgroundColour = newColour; changed(); diff --git a/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.h b/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.h index 61c79d0426..3647ad0a37 100644 --- a/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.h +++ b/extras/Introjucer/Source/ComponentEditor/jucer_PaintRoutine.h @@ -62,7 +62,7 @@ public: void elementToBack (PaintElement* element, const bool undoable); const Colour getBackgroundColour() const noexcept { return backgroundColour; } - void setBackgroundColour (const Colour& newColour) noexcept; + void setBackgroundColour (Colour newColour) noexcept; void fillWithBackground (Graphics& g, const bool drawOpaqueBackground); void drawElements (Graphics& g, const Rectangle& relativeTo); diff --git a/extras/Introjucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp b/extras/Introjucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp index d19a281785..d28980f9af 100644 --- a/extras/Introjucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp +++ b/extras/Introjucer/Source/ComponentEditor/paintelements/jucer_ColouredElement.cpp @@ -110,7 +110,7 @@ public: { } - void setColour (const Colour& newColour) + void setColour (Colour newColour) override { owner->getDocument()->getUndoManager().undoCurrentTransactionOnly(); @@ -131,7 +131,7 @@ public: owner->setStrokeFill (fill, true); } - Colour getColour() const + Colour getColour() const override { const JucerFillType fill (isForStroke ? owner->getStrokeType().fill : owner->getFillType()); @@ -147,7 +147,7 @@ public: return Colours::black; } - void resetToDefault() + void resetToDefault() override { jassertfalse; // option shouldn't be visible } diff --git a/extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h b/extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h index aa4c3c2fc6..213820a007 100644 --- a/extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h +++ b/extras/Introjucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h @@ -39,7 +39,7 @@ public: addAndMakeVisible (colourPropEditor); } - virtual void setColour (const Colour& newColour) = 0; + virtual void setColour (Colour newColour) = 0; virtual Colour getColour() const = 0; virtual void resetToDefault() = 0; @@ -73,7 +73,7 @@ public: Justification::centred, 1); } - virtual void setColour (const Colour& newColour) = 0; + virtual void setColour (Colour newColour) = 0; virtual void resetToDefault() = 0; virtual Colour getColour() const = 0; @@ -155,17 +155,17 @@ public: { } - int getNumSwatches() const + int getNumSwatches() const override { return getAppSettings().swatchColours.size(); } - Colour getSwatchColour (int index) const + Colour getSwatchColour (int index) const override { return getAppSettings().swatchColours [index]; } - void setSwatchColour (int index, const Colour& newColour) const + void setSwatchColour (int index, const Colour& newColour) const override { getAppSettings().swatchColours.set (index, newColour); } @@ -192,12 +192,12 @@ public: owner (owner_) {} - void setColour (const Colour& newColour) + void setColour (Colour newColour) override { owner->setColour (newColour); } - Colour getColour() const + Colour getColour() const override { return owner->getColour(); } diff --git a/extras/Introjucer/Source/ComponentEditor/properties/jucer_ComponentColourProperty.h b/extras/Introjucer/Source/ComponentEditor/properties/jucer_ComponentColourProperty.h index 74ec2dea3b..9e08d4b10a 100644 --- a/extras/Introjucer/Source/ComponentEditor/properties/jucer_ComponentColourProperty.h +++ b/extras/Introjucer/Source/ComponentEditor/properties/jucer_ComponentColourProperty.h @@ -86,7 +86,7 @@ public: return component->findColour (colourId); } - void setColour (const Colour& newColour) + void setColour (Colour newColour) { if (component->findColour (colourId) != newColour) { @@ -122,9 +122,9 @@ private: ColourChangeAction (Component* const comp, ComponentLayout& layout, const int colourId_, - const Colour& newColour_, + Colour newColour_, const bool newColourIsDefault) - : ComponentUndoableAction (comp, layout), + : ComponentUndoableAction (comp, layout), colourId (colourId_), newColour (newColour_), isDefault (newColourIsDefault) diff --git a/extras/Introjucer/Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp b/extras/Introjucer/Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp index b972df7def..cd28379c94 100644 --- a/extras/Introjucer/Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp +++ b/extras/Introjucer/Source/ComponentEditor/ui/jucer_PaintRoutinePanel.cpp @@ -47,15 +47,15 @@ public: document.removeChangeListener (this); } - void changeListenerCallback (ChangeBroadcaster*) + void changeListenerCallback (ChangeBroadcaster*) override { refresh(); } - void setColour (const Colour& newColour) { routine.setBackgroundColour (newColour); } - Colour getColour() const { return routine.getBackgroundColour(); } + void setColour (Colour newColour) override { routine.setBackgroundColour (newColour); } + Colour getColour() const override { return routine.getBackgroundColour(); } - void resetToDefault() + void resetToDefault() override { jassertfalse; // option shouldn't be visible } diff --git a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp index 0153eba457..122ebcd7b0 100644 --- a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp +++ b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp @@ -123,7 +123,7 @@ Colour JucerTreeViewBase::getContrastingColour (float contrast) const return getBackgroundColour().contrasting (contrast); } -Colour JucerTreeViewBase::getContrastingColour (const Colour& target, float minContrast) const +Colour JucerTreeViewBase::getContrastingColour (Colour target, float minContrast) const { return getBackgroundColour().contrasting (target, minContrast); } diff --git a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h index 3804bc20af..89a4157479 100644 --- a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h +++ b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h @@ -99,7 +99,7 @@ protected: Colour getBackgroundColour() const; Colour getContrastingColour (float contrast) const; - Colour getContrastingColour (const Colour& targetColour, float minContrast) const; + Colour getContrastingColour (Colour targetColour, float minContrast) const; private: class ItemSelectionTimer; diff --git a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h index 20b5fe8d09..6a62084f2f 100644 --- a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h +++ b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h @@ -58,8 +58,8 @@ bool reinvokeCommandAfterCancellingModalComps (const ApplicationCommandTarget::I struct Icon { Icon() : path (nullptr) {} - Icon (const Path& p, const Colour& c) : path (&p), colour (c) {} - Icon (const Path* p, const Colour& c) : path (p), colour (c) {} + Icon (const Path& p, Colour c) : path (&p), colour (c) {} + Icon (const Path* p, Colour c) : path (p), colour (c) {} void draw (Graphics& g, const Rectangle& area, bool isCrossedOut) const { @@ -79,7 +79,7 @@ struct Icon } } - Icon withContrastingColourTo (const Colour& background) const + Icon withContrastingColourTo (Colour background) const { return Icon (path, background.contrasting (colour, 0.6f)); } @@ -217,7 +217,7 @@ class PopupColourSelector : public Component, { public: PopupColourSelector (const Value& colour, - const Colour& defaultCol, + Colour defaultCol, const bool canResetToDefault) : defaultButton ("Reset to Default"), colourValue (colour), @@ -260,7 +260,7 @@ public: return Colour::fromString (colourValue.toString()); } - void setColour (const Colour& newColour) + void setColour (Colour newColour) { if (getColour() != newColour) { @@ -305,7 +305,7 @@ class ColourEditorComponent : public Component, { public: ColourEditorComponent (UndoManager* um, const Value& colour, - const Colour& defaultCol, const bool canReset) + Colour defaultCol, const bool canReset) : undoManager (um), colourValue (colour), defaultColour (defaultCol), canResetToDefault (canReset) { @@ -336,7 +336,7 @@ public: return Colour::fromString (colourValue.toString()); } - void setColour (const Colour& newColour) + void setColour (Colour newColour) { if (getColour() != newColour) { @@ -394,7 +394,7 @@ class ColourPropertyComponent : public PropertyComponent { public: ColourPropertyComponent (UndoManager* undoManager, const String& name, const Value& colour, - const Colour& defaultColour, bool canResetToDefault) + Colour defaultColour, bool canResetToDefault) : PropertyComponent (name), colourEditor (undoManager, colour, defaultColour, canResetToDefault) { diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h index 8bfa8a800c..feef4aed22 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h @@ -48,16 +48,16 @@ public: void setLastProjects (const Array& files); //============================================================================== - Array swatchColours; + Array swatchColours; class ColourSelectorWithSwatches : public ColourSelector { public: ColourSelectorWithSwatches() {} - int getNumSwatches() const; - Colour getSwatchColour (int index) const; - void setSwatchColour (int index, const Colour& newColour) const; + int getNumSwatches() const override; + Colour getSwatchColour (int index) const override; + void setSwatchColour (int index, const Colour& newColour) const override; }; //============================================================================== diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 8a6affc682..0bed79c539 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -257,8 +257,8 @@ Rectangle MidiKeyboardComponent::getWhiteNotePos (int noteNum) const int MidiKeyboardComponent::getKeyStartPosition (const int midiNoteNumber) const { - int x, y; - getKeyPos (midiNoteNumber, x, y); + int x, w; + getKeyPos (midiNoteNumber, x, w); return x; } diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h index 7bbe5dfa92..987d742081 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h @@ -204,7 +204,7 @@ public: Depending on the keyboard's orientation, this may be a horizontal or vertical distance, in either direction. */ - int getKeyStartPosition (const int midiNoteNumber) const; + int getKeyStartPosition (int midiNoteNumber) const; //============================================================================== /** Deletes all key-mappings. @@ -387,8 +387,8 @@ private: bool canScroll, useMousePositionForVelocity, shouldCheckMousePos; ScopedPointer