Browse Source

Found a few missing 'override' specifiers

tags/2021-05-28
jules 9 years ago
parent
commit
8343f3468c
21 changed files with 70 additions and 71 deletions
  1. +1
    -1
      examples/Demo/Source/Demos/AnimationDemo.cpp
  2. +1
    -1
      examples/Demo/Source/Demos/Box2DDemo.cpp
  3. +3
    -3
      examples/Demo/Source/Demos/GraphicsDemo.cpp
  4. +1
    -1
      examples/Demo/Source/Demos/LiveConstantDemo.cpp
  5. +5
    -5
      examples/Demo/Source/Demos/WindowsDemo.cpp
  6. +14
    -14
      examples/audio plugin host/Source/GraphEditorPanel.cpp
  7. +6
    -6
      extras/Projucer/JuceLibraryCode/BinaryData.cpp
  8. +2
    -2
      extras/Projucer/JuceLibraryCode/BinaryData.h
  9. +1
    -1
      extras/Projucer/Source/Application/jucer_FilePreviewComponent.h
  10. +2
    -2
      extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h
  11. +2
    -2
      extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h
  12. +1
    -1
      extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h
  13. +3
    -3
      extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h
  14. +2
    -3
      extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h
  15. +2
    -2
      extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp
  16. +6
    -6
      extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h
  17. +3
    -3
      extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp
  18. +7
    -7
      extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp
  19. +1
    -1
      extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp
  20. +4
    -4
      extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h
  21. +3
    -3
      extras/Projucer/Source/Utility/jucer_TranslationTool.h

+ 1
- 1
examples/Demo/Source/Demos/AnimationDemo.cpp View File

@@ -102,7 +102,7 @@ struct BallComponent : public Component
return position.y < 400.0f && position.x >= -10.0f;
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.setColour (colour);
g.fillEllipse (2.0f, 2.0f, getWidth() - 4.0f, getHeight() - 4.0f);


+ 1
- 1
examples/Demo/Source/Demos/Box2DDemo.cpp View File

@@ -136,7 +136,7 @@ struct Box2DRenderComponent : public Component
setOpaque (true);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (Colours::white);


+ 3
- 3
examples/Demo/Source/Demos/GraphicsDemo.cpp View File

@@ -569,13 +569,13 @@ public:
setOpaque (true);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillCheckerBoard (getLocalBounds(), 48, 48,
Colours::lightgrey, Colours::white);
}
void timerCallback()
void timerCallback() override
{
if (currentDemo != nullptr)
currentDemo->repaint();
@@ -596,7 +596,7 @@ public:
}
}
void resized()
void resized() override
{
if (currentDemo != nullptr)
currentDemo->setBounds (getLocalBounds());


+ 1
- 1
examples/Demo/Source/Demos/LiveConstantDemo.cpp View File

@@ -30,7 +30,7 @@ struct LiveConstantDemoComponent : public Component
{
LiveConstantDemoComponent() {}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (JUCE_LIVE_CONSTANT (Colour (0xffe5e7a7)));


+ 5
- 5
examples/Demo/Source/Demos/WindowsDemo.cpp View File

@@ -110,13 +110,13 @@ public:
startTimer (60);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.setColour (colour);
g.fillEllipse (ballBounds - getPosition().toFloat());
}
void timerCallback()
void timerCallback() override
{
ballBounds += direction;
@@ -150,18 +150,18 @@ public:
}
}
void mouseDown (const MouseEvent& e)
void mouseDown (const MouseEvent& e) override
{
dragger.startDraggingComponent (this, e);
}
void mouseDrag (const MouseEvent& e)
void mouseDrag (const MouseEvent& e) override
{
// as there's no titlebar we have to manage the dragging ourselves
dragger.dragComponent (this, e, 0);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
if (isOpaque())
g.fillAll (Colours::white);


+ 14
- 14
examples/audio plugin host/Source/GraphEditorPanel.cpp View File

@@ -136,12 +136,12 @@ public:
setSize (400, jlimit (25, 400, totalHeight));
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (Colours::grey);
}
void resized()
void resized() override
{
panel.setBounds (getLocalBounds());
}
@@ -253,7 +253,7 @@ public:
setSize (16, 16);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
const float w = (float) getWidth();
const float h = (float) getHeight();
@@ -267,7 +267,7 @@ public:
g.fillPath (p);
}
void mouseDown (const MouseEvent& e)
void mouseDown (const MouseEvent& e) override
{
getGraphPanel()->beginConnectorDrag (isInput ? 0 : filterID,
index,
@@ -276,12 +276,12 @@ public:
e);
}
void mouseDrag (const MouseEvent& e)
void mouseDrag (const MouseEvent& e) override
{
getGraphPanel()->dragConnector (e);
}
void mouseUp (const MouseEvent& e)
void mouseUp (const MouseEvent& e) override
{
getGraphPanel()->endDraggingConnector (e);
}
@@ -663,7 +663,7 @@ public:
}
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
if (sourceFilterChannel == FilterGraph::midiChannelNumber
|| destFilterChannel == FilterGraph::midiChannelNumber)
@@ -678,7 +678,7 @@ public:
g.fillPath (linePath);
}
bool hitTest (int x, int y)
bool hitTest (int x, int y) override
{
if (hitPath.contains ((float) x, (float) y))
{
@@ -692,12 +692,12 @@ public:
return false;
}
void mouseDown (const MouseEvent&)
void mouseDown (const MouseEvent&) override
{
dragging = false;
}
void mouseDrag (const MouseEvent& e)
void mouseDrag (const MouseEvent& e) override
{
if (dragging)
{
@@ -721,13 +721,13 @@ public:
}
}
void mouseUp (const MouseEvent& e)
void mouseUp (const MouseEvent& e) override
{
if (dragging)
getGraphPanel()->endDraggingConnector (e);
}
void resized()
void resized() override
{
float x1, y1, x2, y2;
getPoints (x1, y1, x2, y2);
@@ -1058,14 +1058,14 @@ public:
startTimer (100);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.setFont (Font (getHeight() * 0.7f, Font::bold));
g.setColour (Colours::black);
g.drawFittedText (tip, 10, 0, getWidth() - 12, getHeight(), Justification::centredLeft, 1);
}
void timerCallback()
void timerCallback() override
{
Component* const underMouse = Desktop::getInstance().getMainMouseSource().getComponentUnderMouse();
TooltipClient* const ttc = dynamic_cast<TooltipClient*> (underMouse);


+ 6
- 6
extras/Projucer/JuceLibraryCode/BinaryData.cpp View File

@@ -738,7 +738,7 @@ static const unsigned char temp_binary_data_10[] =
" {\r\n"
" }\r\n"
"\r\n"
" void paint (Graphics& g)\r\n"
" void paint (Graphics& g) override\r\n"
" {\r\n"
" // You should replace everything in this method with your own drawing code..\r\n"
"\r\n"
@@ -753,7 +753,7 @@ static const unsigned char temp_binary_data_10[] =
" Justification::centred, true); // draw some placeholder text\r\n"
" }\r\n"
"\r\n"
" void resized()\r\n"
" void resized() override\r\n"
" {\r\n"
" // This method is where you should set the bounds of any child\r\n"
" // components that your component contains..\r\n"
@@ -1229,7 +1229,7 @@ static const unsigned char temp_binary_data_19[] =
" {\r\n"
" }\r\n"
"\r\n"
" void paint (Graphics& g)\r\n"
" void paint (Graphics& g) override\r\n"
" {\r\n"
" /* This demo code just fills the component's background and\r\n"
" draws some placeholder text to get you started.\r\n"
@@ -1249,7 +1249,7 @@ static const unsigned char temp_binary_data_19[] =
" Justification::centred, true); // draw some placeholder text\r\n"
" }\r\n"
"\r\n"
" void resized()\r\n"
" void resized() override\r\n"
" {\r\n"
" // This method is where you should set the bounds of any child\r\n"
" // components that your component contains..\r\n"
@@ -4027,7 +4027,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw
case 0xfc72fe86: numBytes = 2155; return jucer_ComponentTemplate_h;
case 0x0b66646c: numBytes = 886; return jucer_ContentCompTemplate_cpp;
case 0x6fa10171: numBytes = 924; return jucer_ContentCompTemplate_h;
case 0x28d496ad: numBytes = 1143; return jucer_InlineComponentTemplate_h;
case 0x28d496ad: numBytes = 1161; return jucer_InlineComponentTemplate_h;
case 0x8905395b: numBytes = 470; return jucer_MainConsoleAppTemplate_cpp;
case 0x5e5ea047: numBytes = 1992; return jucer_MainTemplate_NoWindow_cpp;
case 0xda2391f8: numBytes = 3848; return jucer_MainTemplate_SimpleWindow_cpp;
@@ -4036,7 +4036,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw
case 0xe7bf237a: numBytes = 648; return jucer_NewComponentTemplate_h;
case 0x02a2a077: numBytes = 262; return jucer_NewCppFileTemplate_cpp;
case 0x0842c43c: numBytes = 308; return jucer_NewCppFileTemplate_h;
case 0x36e634a1: numBytes = 1626; return jucer_NewInlineComponentTemplate_h;
case 0x36e634a1: numBytes = 1644; return jucer_NewInlineComponentTemplate_h;
case 0x7fbac252: numBytes = 1827; return jucer_OpenGLComponentTemplate_cpp;
case 0x406db5c1: numBytes = 3117; return background_logo_svg;
case 0x4a0cfd09: numBytes = 151; return background_tile_png;


+ 2
- 2
extras/Projucer/JuceLibraryCode/BinaryData.h View File

@@ -40,7 +40,7 @@ namespace BinaryData
const int jucer_ContentCompTemplate_hSize = 924;
extern const char* jucer_InlineComponentTemplate_h;
const int jucer_InlineComponentTemplate_hSize = 1143;
const int jucer_InlineComponentTemplate_hSize = 1161;
extern const char* jucer_MainConsoleAppTemplate_cpp;
const int jucer_MainConsoleAppTemplate_cppSize = 470;
@@ -67,7 +67,7 @@ namespace BinaryData
const int jucer_NewCppFileTemplate_hSize = 308;
extern const char* jucer_NewInlineComponentTemplate_h;
const int jucer_NewInlineComponentTemplate_hSize = 1626;
const int jucer_NewInlineComponentTemplate_hSize = 1644;
extern const char* jucer_OpenGLComponentTemplate_cpp;
const int jucer_OpenGLComponentTemplate_cppSize = 1827;


+ 1
- 1
extras/Projucer/Source/Application/jucer_FilePreviewComponent.h View File

@@ -40,7 +40,7 @@ public:
tryToLoadImage();
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
ProjucerLookAndFeel::fillWithBackgroundTexture (*this, g);


+ 2
- 2
extras/Projucer/Source/BinaryData/jucer_InlineComponentTemplate.h View File

@@ -13,7 +13,7 @@ public:
{
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
// You should replace everything in this method with your own drawing code..
@@ -28,7 +28,7 @@ public:
Justification::centred, true); // draw some placeholder text
}
void resized()
void resized() override
{
// This method is where you should set the bounds of any child
// components that your component contains..


+ 2
- 2
extras/Projucer/Source/BinaryData/jucer_NewInlineComponentTemplate.h View File

@@ -30,7 +30,7 @@ public:
{
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
/* This demo code just fills the component's background and
draws some placeholder text to get you started.
@@ -50,7 +50,7 @@ public:
Justification::centred, true); // draw some placeholder text
}
void resized()
void resized() override
{
// This method is where you should set the bounds of any child
// components that your component contains..


+ 1
- 1
extras/Projucer/Source/ComponentEditor/components/jucer_GenericComponentHandler.h View File

@@ -31,7 +31,7 @@ public:
{
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (Colours::white.withAlpha (0.25f));


+ 3
- 3
extras/Projucer/Source/ComponentEditor/components/jucer_TabbedComponentHandler.h View File

@@ -342,7 +342,7 @@ private:
setSize (2048, 2048);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
if (jucerComp == nullptr)
g.fillCheckerBoard (getLocalBounds(), 50, 50,
@@ -350,7 +350,7 @@ private:
Colour::greyLevel (0.8f).withAlpha (0.4f));
}
void resized()
void resized() override
{
if (jucerComp != nullptr)
{
@@ -384,7 +384,7 @@ private:
resized();
}
void parentHierarchyChanged()
void parentHierarchyChanged() override
{
updateContent();
}


+ 2
- 3
extras/Projucer/Source/ComponentEditor/components/jucer_ViewportHandler.h View File

@@ -266,15 +266,14 @@ private:
};
//==============================================================================
class ViewportDemoContentComp : public Component
struct ViewportDemoContentComp : public Component
{
public:
ViewportDemoContentComp()
{
setSize (2048, 2048);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillCheckerBoard (getLocalBounds(), 50, 50,
Colours::lightgrey.withAlpha (0.5f),


+ 2
- 2
extras/Projucer/Source/ComponentEditor/documents/jucer_ComponentDocument.cpp View File

@@ -111,13 +111,13 @@ public:
removeChildComponent (i);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
document->getPaintRoutine (0)->fillWithBackground (g, alwaysFillBackground);
document->getPaintRoutine (0)->drawElements (g, getLocalBounds());
}
void resized()
void resized() override
{
if (! getBounds().isEmpty())
{


+ 6
- 6
extras/Projucer/Source/ComponentEditor/properties/jucer_ColourPropertyComponent.h View File

@@ -41,7 +41,7 @@ public:
virtual Colour getColour() const = 0;
virtual void resetToDefault() = 0;
void refresh()
void refresh() override
{
((ColourPropEditorComponent*) getChildComponent (0))->refresh();
}
@@ -55,7 +55,7 @@ public:
{
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (Colours::grey);
@@ -86,13 +86,13 @@ public:
}
}
void mouseDown (const MouseEvent&)
void mouseDown (const MouseEvent&) override
{
CallOutBox::launchAsynchronously (new ColourSelectorComp (this, canResetToDefault),
getScreenBounds(), nullptr);
}
void changeListenerCallback (ChangeBroadcaster* source)
void changeListenerCallback (ChangeBroadcaster* source) override
{
const ColourSelector* const cs = (const ColourSelector*) source;
@@ -123,7 +123,7 @@ public:
setSize (300, 400);
}
void resized()
void resized() override
{
if (defaultButton.isVisible())
{
@@ -137,7 +137,7 @@ public:
}
}
void buttonClicked (Button*)
void buttonClicked (Button*) override
{
owner->resetToDefault();
owner->refresh();


+ 3
- 3
extras/Projucer/Source/ComponentEditor/ui/jucer_ComponentLayoutEditor.cpp View File

@@ -43,7 +43,7 @@ public:
setFocusContainer (true);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
if (! dontFillBackground)
{
@@ -59,7 +59,7 @@ public:
}
}
void resized()
void resized() override
{
if (! getBounds().isEmpty())
{
@@ -92,7 +92,7 @@ public:
}
}
void moved()
void moved() override
{
((ComponentLayoutEditor*) getParentComponent())->updateOverlayPositions();
}


+ 7
- 7
extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp View File

@@ -58,12 +58,12 @@ public:
document.removeChangeListener (this);
}
int getNumRows()
int getNumRows() override
{
return methods.size();
}
void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected)
void paintListBoxItem (int row, Graphics& g, int width, int height, bool rowIsSelected) override
{
if (row < 0 || row >= getNumRows())
return;
@@ -80,7 +80,7 @@ public:
getLookAndFeel().drawTickBox (g, *this, 6, 2, 18, 18, document.isOptionalMethodEnabled (methods [row]), true, false, false);
}
void listBoxItemClicked (int row, const MouseEvent& e)
void listBoxItemClicked (int row, const MouseEvent& e) override
{
if (row < 0 || row >= getNumRows())
return;
@@ -90,17 +90,17 @@ public:
! document.isOptionalMethodEnabled (methods [row]));
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.fillAll (Colours::white);
}
void resized()
void resized() override
{
listBox->setBounds (getLocalBounds());
}
void refresh()
void refresh() override
{
baseClasses.clear();
returnValues.clear();
@@ -113,7 +113,7 @@ public:
listBox->repaint();
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}


+ 1
- 1
extras/Projucer/Source/Project/jucer_ProjectContentComponent.cpp View File

@@ -159,7 +159,7 @@ struct LogoComponent : public Component
logo = Drawable::createFromSVG (*svg);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.setColour (findColour (mainBackgroundColourId).contrasting (0.3f));


+ 4
- 4
extras/Projucer/Source/Utility/jucer_SVGPathDataComponent.h View File

@@ -54,12 +54,12 @@ public:
userText.setText (getLastText());
}
void textEditorTextChanged (TextEditor&)
void textEditorTextChanged (TextEditor&) override
{
update();
}
void textEditorEscapeKeyPressed (TextEditor&)
void textEditorEscapeKeyPressed (TextEditor&) override
{
getTopLevelComponent()->exitModalState (0);
}
@@ -93,7 +93,7 @@ public:
repaint (previewPathArea);
}
void resized()
void resized() override
{
Rectangle<int> r (getLocalBounds().reduced (8));
desc.setBounds (r.removeFromTop (44));
@@ -104,7 +104,7 @@ public:
resultText.setBounds (r);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
g.setColour (Colours::white);
g.fillPath (path, path.getTransformToScaleToFit (previewPathArea.reduced (4).toFloat(), true));


+ 3
- 3
extras/Projucer/Source/Utility/jucer_TranslationTool.h View File

@@ -356,12 +356,12 @@ public:
loadButton.addListener (this);
}
void paint (Graphics& g)
void paint (Graphics& g) override
{
ProjucerLookAndFeel::fillWithBackgroundTexture (*this, g);
}
void resized()
void resized() override
{
const int m = 6;
const int textH = 44;
@@ -401,7 +401,7 @@ private:
ProjucerLookAndFeel lf;
void buttonClicked (Button* b)
void buttonClicked (Button* b) override
{
if (b == &generateButton) generate();
else if (b == &loadButton) loadFile();


Loading…
Cancel
Save