1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Warnings: Add missing overrides

This commit is contained in:
reuk 2024-01-24 12:00:28 +00:00
parent 6c32c4df87
commit 047448fbce
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
84 changed files with 630 additions and 627 deletions

View file

@ -690,7 +690,7 @@ struct MenuPage final : public Component
{
void drawPopupMenuColumnSeparatorWithOptions (Graphics& g,
const Rectangle<int>& bounds,
const PopupMenu::Options& opt)
const PopupMenu::Options& opt) override
{
if (auto* target = opt.getTargetComponent())
{
@ -708,7 +708,7 @@ struct MenuPage final : public Component
}
}
void drawPopupMenuBackgroundWithOptions (Graphics& g, int, int, const PopupMenu::Options& opt)
void drawPopupMenuBackgroundWithOptions (Graphics& g, int, int, const PopupMenu::Options& opt) override
{
if (auto* target = opt.getTargetComponent())
{
@ -717,7 +717,7 @@ struct MenuPage final : public Component
}
// Return the amount of space that should be left between popup menu columns.
int getPopupMenuColumnSeparatorWidthWithOptions (const PopupMenu::Options&)
int getPopupMenuColumnSeparatorWidthWithOptions (const PopupMenu::Options&) override
{
return 10;
}

View file

@ -57,7 +57,7 @@ public:
: DocumentWindow (name, backgroundColour, buttonsNeeded)
{}
void closeButtonPressed()
void closeButtonPressed() override
{
delete this;
}
@ -81,12 +81,12 @@ public:
setContentOwned (&selector, false);
}
~ColourSelectorWindow()
~ColourSelectorWindow() override
{
selector.removeChangeListener (this);
}
void closeButtonPressed()
void closeButtonPressed() override
{
delete this;
}
@ -96,7 +96,7 @@ private:
| ColourSelector::showSliders
| ColourSelector::showColourspace };
void changeListenerCallback (ChangeBroadcaster* source)
void changeListenerCallback (ChangeBroadcaster* source) override
{
if (source == &selector)
setBackgroundColour (selector.getCurrentColour());

View file

@ -79,8 +79,8 @@ struct Settings
struct Test
{
Test() {}
virtual ~Test() {}
Test() = default;
virtual ~Test() = default;
virtual void Keyboard (unsigned char /*key*/) {}
virtual void KeyboardUp (unsigned char /*key*/) {}
@ -88,7 +88,7 @@ struct Test
std::unique_ptr<b2World> m_world { new b2World (b2Vec2 (0.0f, -10.0f)) };
};
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-int-float-conversion")
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-int-float-conversion", "-Wsuggest-override")
#include "../Assets/Box2DTests/AddPair.h"
#include "../Assets/Box2DTests/ApplyForce.h"

View file

@ -74,7 +74,7 @@
{
ScanJob (AUScanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
JobStatus runJob()
JobStatus runJob() override
{
while (scanner.doNextScan() && ! shouldExit())
{}

View file

@ -113,7 +113,7 @@ private:
{
PIPCreatorLookAndFeel() {}
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component)
Rectangle<int> getPropertyComponentContentPosition (PropertyComponent& component) override
{
auto textW = jmin (200, component.getWidth() / 3);
return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };

View file

@ -138,7 +138,7 @@ class RecentDocumentList final : private OpenDocumentManager::DocumentCloseListe
{
public:
RecentDocumentList();
~RecentDocumentList();
~RecentDocumentList() override;
void clear();
@ -160,7 +160,7 @@ public:
std::unique_ptr<XmlElement> createXML() const;
private:
bool documentAboutToClose (OpenDocumentManager::Document*);
bool documentAboutToClose (OpenDocumentManager::Document*) override;
Array<OpenDocumentManager::Document*> previousDocs, nextDocs;
};

View file

@ -204,7 +204,7 @@ private:
oldName = comp->getButtonText();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setButtonText (newName);
@ -212,7 +212,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setButtonText (oldName);
@ -232,13 +232,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new ButtonCallbackChangeAction (component, *document.getComponentLayout(), newState),
"Change button callback");
}
bool getState() const { return needsButtonListener (component); }
bool getState() const override { return needsButtonListener (component); }
private:
class ButtonCallbackChangeAction : public ComponentUndoableAction <Button>
@ -251,7 +251,7 @@ private:
oldState = needsButtonListener (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
setNeedsButtonListener (getComponent(), newState);
@ -259,7 +259,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setNeedsButtonListener (getComponent(), oldState);
@ -301,7 +301,7 @@ private:
oldId = comp->getRadioGroupId();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setRadioGroupId (newId);
@ -309,7 +309,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setRadioGroupId (oldId);
@ -331,13 +331,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new ButtonConnectedChangeAction (component, *document.getComponentLayout(), flag, newState),
"Change button connected edges");
}
bool getState() const
bool getState() const override
{
return (component->getConnectedEdgeFlags() & flag) != 0;
}
@ -356,7 +356,7 @@ private:
oldState = ((comp->getConnectedEdgeFlags() & flag) != 0);
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -369,7 +369,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();

View file

@ -197,13 +197,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new ComboEditableChangeAction (component, *document.getComponentLayout(), newState),
"Change combo box editability");
}
bool getState() const
bool getState() const override
{
return component->isTextEditable();
}
@ -219,7 +219,7 @@ private:
oldState = comp->isTextEditable();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setEditableText (newState);
@ -227,7 +227,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setEditableText (oldState);
@ -250,13 +250,13 @@ private:
{
}
void setJustification (Justification newJustification)
void setJustification (Justification newJustification) override
{
document.perform (new ComboJustifyChangeAction (component, *document.getComponentLayout(), newJustification),
"Change combo box justification");
}
Justification getJustification() const { return component->getJustificationType(); }
Justification getJustification() const override { return component->getJustificationType(); }
private:
ComboBox* const component;
@ -272,7 +272,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setJustificationType (newState);
@ -280,7 +280,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setJustificationType (oldState);
@ -322,7 +322,7 @@ private:
oldState = comp->getProperties() ["items"];
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->getProperties().set ("items", newState);
@ -331,7 +331,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->getProperties().set ("items", oldState);
@ -374,7 +374,7 @@ private:
oldState = comp->getTextWhenNothingSelected();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTextWhenNothingSelected (newState);
@ -382,7 +382,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTextWhenNothingSelected (oldState);
@ -424,7 +424,7 @@ private:
oldState = comp->getTextWhenNoChoicesAvailable();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTextWhenNoChoicesAvailable (newState);
@ -432,7 +432,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTextWhenNoChoicesAvailable (oldState);

View file

@ -60,7 +60,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setName (newName);
@ -68,7 +68,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setName (oldName);
@ -110,14 +110,14 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
layout.setComponentMemberVariableName (getComponent(), newName);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
layout.setComponentMemberVariableName (getComponent(), oldName);
@ -159,14 +159,14 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
layout.setComponentVirtualClassName (getComponent(), newName);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
layout.setComponentVirtualClassName (getComponent(), oldName);

View file

@ -300,7 +300,7 @@ private:
oldValue = ttc->getTooltip();
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -314,7 +314,7 @@ private:
return false;
}
bool undo()
bool undo() override
{
showCorrectTab();
@ -348,12 +348,12 @@ public:
document.addChangeListener (this);
}
~ComponentPositionProperty()
~ComponentPositionProperty() override
{
document.removeChangeListener (this);
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
auto* l = document.getComponentLayout();
@ -363,7 +363,7 @@ public:
l->setComponentPosition (component, newPos, true);
}
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{
return ComponentTypeHandler::getComponentPosition (component);
}
@ -439,7 +439,7 @@ private:
oldValue = comp->getExplicitFocusOrder();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setExplicitFocusOrder (newValue);
@ -447,7 +447,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setExplicitFocusOrder (oldValue);

View file

@ -48,7 +48,7 @@ public:
return c;
}
int getSizeInUnits() { return 2; }
int getSizeInUnits() override { return 2; }
protected:
ComponentLayout& layout;

View file

@ -169,7 +169,7 @@ private:
oldState = comp->actualClassName;
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setClassName (newState);
@ -177,7 +177,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setClassName (oldState);
@ -219,7 +219,7 @@ private:
oldState = comp->constructorParams;
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setParams (newState);
@ -227,7 +227,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setParams (oldState);

View file

@ -150,7 +150,7 @@ private:
oldName = comp->getText();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setText (newName);
@ -158,7 +158,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setText (oldName);
@ -215,7 +215,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTextLabelPosition (newState);
@ -223,7 +223,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTextLabelPosition (oldState);

View file

@ -127,7 +127,7 @@ private:
oldState = comp->getURL();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setURL (newState);
@ -135,7 +135,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setURL (oldState);

View file

@ -179,12 +179,12 @@ public:
{
}
void setResource (const String& newName)
void setResource (const String& newName) override
{
setImageResource (layout, element, role, newName, true);
}
String getResource() const
String getResource() const override
{
return getImageResource (element, role);
}
@ -314,12 +314,12 @@ public:
{
}
void setState (bool newState)
void setState (bool newState) override
{
setImageKeepProportions (layout, component, newState, true);
}
bool getState() const
bool getState() const override
{
return doesImageKeepProportions (component);
}

View file

@ -128,7 +128,7 @@ public:
oldState = comp->getFilename();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setFilename (newState);
@ -136,7 +136,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setFilename (oldState);
@ -206,13 +206,13 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
if (ProjectContentComponent* const pcc = findParentComponentOfClass<ProjectContentComponent>())
pcc->showEditorForFile (component->findFile(), true);
}
String getButtonText() const
String getButtonText() const override
{
return "Open file for editing";
}
@ -249,7 +249,7 @@ private:
oldValue = comp->getConstructorParams();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setConstructorParams (newValue);
@ -258,7 +258,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setConstructorParams (oldValue);

View file

@ -236,7 +236,7 @@ private:
oldState = comp->getText();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setText (newState, dontSendNotification);
@ -244,7 +244,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setText (oldState, dontSendNotification);
@ -268,13 +268,13 @@ private:
choices.add ("edit on double-click");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new LabelEditableChangeAction (component, *document.getComponentLayout(), newIndex),
"Change Label editability");
}
int getIndex() const
int getIndex() const override
{
return component->isEditableOnSingleClick()
? 1
@ -294,7 +294,7 @@ private:
: (comp->isEditableOnDoubleClick() ? 2 : 0);
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setEditable (newState == 1, newState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
@ -303,7 +303,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setEditable (oldState == 1, oldState >= 1, getComponent()->doesLossOfFocusDiscardChanges());
@ -327,13 +327,13 @@ private:
choices.add ("loss of focus commits changes");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new LabelFocusLossChangeAction (component, *document.getComponentLayout(), newIndex == 0),
"Change Label focus behaviour");
}
int getIndex() const
int getIndex() const override
{
return component->doesLossOfFocusDiscardChanges() ? 0 : 1;
}
@ -349,7 +349,7 @@ private:
oldState = comp->doesLossOfFocusDiscardChanges();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
@ -359,7 +359,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setEditable (getComponent()->isEditableOnSingleClick(),
@ -418,7 +418,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setJustificationType (newState);
@ -426,7 +426,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setJustificationType (oldState);
@ -483,7 +483,7 @@ private:
oldState = comp->getProperties().getWithDefault ("typefaceName", FontPropertyComponent::getDefaultFont());
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->getProperties().set ("typefaceName", newState);
@ -492,7 +492,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->getProperties().set ("typefaceName", oldState);
@ -552,7 +552,7 @@ private:
oldState = comp->getFont().getHeight();
}
bool perform()
bool perform() override
{
showCorrectTab();
Font f (getComponent()->getFont());
@ -562,7 +562,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
Font f (getComponent()->getFont());
@ -678,7 +678,7 @@ private:
oldState = comp->getFont();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setFont (newState);
@ -686,7 +686,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setFont (oldState);
@ -748,7 +748,7 @@ private:
oldState = comp->getFont().getExtraKerningFactor();
}
bool perform()
bool perform() override
{
showCorrectTab();
Font f (getComponent()->getFont());
@ -758,7 +758,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
Font f (getComponent()->getFont());

View file

@ -418,7 +418,7 @@ private:
choices.add ("Tabs at right");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
const TabbedButtonBar::Orientation orientations[] = { TabbedButtonBar::TabsAtTop,
TabbedButtonBar::TabsAtBottom,
@ -429,7 +429,7 @@ private:
"Change TabComponent orientation");
}
int getIndex() const
int getIndex() const override
{
switch (component->getOrientation())
{
@ -454,7 +454,7 @@ private:
oldState = comp->getOrientation();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setOrientation (newState);
@ -462,7 +462,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setOrientation (oldState);
@ -485,13 +485,13 @@ private:
choices.add ("Tab " + String (i) + ": \"" + comp->getTabNames() [i] + "\"");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new InitialTabChangeAction (component, *document.getComponentLayout(), newIndex),
"Change initial tab");
}
int getIndex() const
int getIndex() const override
{
return component->getCurrentTabIndex();
}
@ -507,7 +507,7 @@ private:
oldValue = comp->getCurrentTabIndex();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setCurrentTabIndex (newValue);
@ -515,7 +515,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setCurrentTabIndex (oldValue);
@ -578,7 +578,7 @@ private:
oldState = comp->getTabBarDepth();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTabBarDepth (newState);
@ -586,7 +586,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTabBarDepth (oldState);
@ -609,13 +609,13 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
document.perform (new AddTabAction (component, *document.getComponentLayout()),
"Add a new tab");
}
String getButtonText() const
String getButtonText() const override
{
return "Create a new tab";
}
@ -632,7 +632,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
addNewTab (getComponent());
@ -641,7 +641,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->removeTab (getComponent()->getNumTabs() - 1);
@ -663,7 +663,7 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
const StringArray names (component->getTabNames());
@ -681,7 +681,7 @@ private:
});
}
String getButtonText() const
String getButtonText() const override
{
return "Delete a tab...";
}
@ -700,7 +700,7 @@ private:
previousState = getTabState (comp, indexToRemove);
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -710,7 +710,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
addNewTab (getComponent(), indexToRemove);
@ -761,7 +761,7 @@ private:
oldValue = comp->getTabNames() [tabIndex];
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTabName (tabIndex, newValue);
@ -769,7 +769,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTabName (tabIndex, oldValue);
@ -839,7 +839,7 @@ private:
oldValue = comp->getTabBackgroundColour (tabIndex);
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setTabBackgroundColour (tabIndex, newValue);
@ -847,7 +847,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setTabBackgroundColour (tabIndex, oldValue);
@ -873,13 +873,13 @@ private:
choices.add ("Named content component");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new TabContentTypeChangeAction (component, *document.getComponentLayout(), tabIndex, newIndex == 0),
"Change tab content type");
}
int getIndex() const
int getIndex() const override
{
return isTabUsingJucerComp (component, tabIndex) ? 0 : 1;
}
@ -898,7 +898,7 @@ private:
oldValue = isTabUsingJucerComp (comp, tabIndex);
}
bool perform()
bool perform() override
{
showCorrectTab();
setTabUsingJucerComp (getComponent(), tabIndex, newValue);
@ -907,7 +907,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setTabUsingJucerComp (getComponent(), tabIndex, oldValue);
@ -973,7 +973,7 @@ private:
oldState = getTabJucerFile (comp, tabIndex);
}
bool perform()
bool perform() override
{
showCorrectTab();
setTabJucerFile (getComponent(), tabIndex, newState);
@ -981,7 +981,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setTabJucerFile (getComponent(), tabIndex, oldState);
@ -1029,7 +1029,7 @@ private:
oldValue = getTabClassName (comp, tabIndex);
}
bool perform()
bool perform() override
{
showCorrectTab();
setTabClassName (getComponent(), tabIndex, newValue);
@ -1038,7 +1038,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setTabClassName (getComponent(), tabIndex, oldValue);
@ -1087,7 +1087,7 @@ private:
oldValue = getTabConstructorParams (comp, tabIndex);
}
bool perform()
bool perform() override
{
showCorrectTab();
setTabConstructorParams (getComponent(), tabIndex, newValue);
@ -1096,7 +1096,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setTabConstructorParams (getComponent(), tabIndex, oldValue);
@ -1122,10 +1122,9 @@ private:
tabIndex (tabIndex_),
totalNumTabs (totalNumTabs_)
{
}
void buttonClicked()
void buttonClicked() override
{
PopupMenu m;
m.addItem (1, "Move this tab up", tabIndex > 0);
@ -1140,7 +1139,7 @@ private:
});
}
String getButtonText() const
String getButtonText() const override
{
return "Move this tab...";
}
@ -1176,13 +1175,13 @@ private:
changed();
}
bool perform()
bool perform() override
{
move (oldIndex, newIndex);
return true;
}
bool undo()
bool undo() override
{
move (newIndex, oldIndex);
return true;

View file

@ -143,13 +143,13 @@ private:
choices.add ("multi-line, return key disabled");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new TextEditorMultilineChangeAction (component, *document.getComponentLayout(), newIndex),
"Change TextEditor multiline mode");
}
int getIndex() const
int getIndex() const override
{
return component->isMultiLine() ? (component->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
}
@ -165,7 +165,7 @@ private:
oldState = comp->isMultiLine() ? (comp->getReturnKeyStartsNewLine() ? 1 : 2) : 0;
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setMultiLine (newState > 0);
@ -174,7 +174,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setMultiLine (oldState > 0);
@ -196,13 +196,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new TextEditorReadonlyChangeAction (component, *document.getComponentLayout(), ! newState),
"Change TextEditor read-only mode");
}
bool getState() const { return ! component->isReadOnly(); }
bool getState() const override { return ! component->isReadOnly(); }
private:
class TextEditorReadonlyChangeAction : public ComponentUndoableAction <TextEditor>
@ -215,7 +215,7 @@ private:
oldState = comp->isReadOnly();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setReadOnly (newState);
@ -223,7 +223,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setReadOnly (oldState);
@ -244,13 +244,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new TextEditorScrollbarChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor scrollbars");
}
bool getState() const { return component->areScrollbarsShown(); }
bool getState() const override { return component->areScrollbarsShown(); }
private:
class TextEditorScrollbarChangeAction : public ComponentUndoableAction <TextEditor>
@ -263,7 +263,7 @@ private:
oldState = comp->areScrollbarsShown();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setScrollbarsShown (newState);
@ -271,7 +271,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setScrollbarsShown (oldState);
@ -292,13 +292,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new TextEditorCaretChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor caret");
}
bool getState() const { return component->isCaretVisible(); }
bool getState() const override { return component->isCaretVisible(); }
private:
class TextEditorCaretChangeAction : public ComponentUndoableAction <TextEditor>
@ -311,7 +311,7 @@ private:
oldState = comp->isCaretVisible();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setCaretVisible (newState);
@ -319,7 +319,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setCaretVisible (oldState);
@ -340,13 +340,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new TextEditorPopupMenuChangeAction (component, *document.getComponentLayout(), newState),
"Change TextEditor popup menu");
}
bool getState() const { return component->isPopupMenuEnabled(); }
bool getState() const override { return component->isPopupMenuEnabled(); }
private:
class TextEditorPopupMenuChangeAction : public ComponentUndoableAction <TextEditor>
@ -359,7 +359,7 @@ private:
oldState = comp->isPopupMenuEnabled();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setPopupMenuEnabled (newState);
@ -367,7 +367,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setPopupMenuEnabled (oldState);
@ -409,7 +409,7 @@ private:
oldState = comp->getProperties() ["initialText"];
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setText (newState, false);
@ -418,7 +418,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setText (oldState, false);

View file

@ -102,13 +102,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new ToggleStateChangeAction (component, *document.getComponentLayout(), newState),
"Change ToggleButton state");
}
bool getState() const
bool getState() const override
{
return component->getToggleState();
}
@ -124,7 +124,7 @@ private:
oldState = comp->getToggleState();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setToggleState (newState, dontSendNotification);
@ -132,7 +132,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setToggleState (oldState, dontSendNotification);

View file

@ -168,13 +168,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new TreeviewRootChangeAction (component, *document.getComponentLayout(), newState),
"Change TreeView root item");
}
bool getState() const
bool getState() const override
{
return component->isRootItemVisible();
}
@ -190,7 +190,7 @@ private:
oldState = comp->isRootItemVisible();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setRootItemVisible (newState);
@ -198,7 +198,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setRootItemVisible (oldState);
@ -221,13 +221,13 @@ private:
choices.add ("Items closed by default");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new TreeviewOpennessChangeAction (component, *document.getComponentLayout(), newIndex == 0),
"Change TreeView openness");
}
int getIndex() const
int getIndex() const override
{
return component->areItemsOpenByDefault() ? 0 : 1;
}
@ -243,7 +243,7 @@ private:
oldState = comp->areItemsOpenByDefault();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setDefaultOpenness (newState);
@ -251,7 +251,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setDefaultOpenness (oldState);

View file

@ -266,7 +266,7 @@ private:
{
}
void parentHierarchyChanged()
void parentHierarchyChanged() override
{
Viewport::parentHierarchyChanged();
updateViewportContentComp (this);
@ -301,13 +301,13 @@ private:
{
}
void setState (bool newState)
void setState (bool newState) override
{
document.perform (new ViewportScrollbarChangeAction (component, *document.getComponentLayout(), vertical, newState),
"Change Viewport scrollbar");
}
bool getState() const
bool getState() const override
{
return vertical ? component->isVerticalScrollBarShown()
: component->isHorizontalScrollBarShown();
@ -328,7 +328,7 @@ private:
: comp->isHorizontalScrollBarShown();
}
bool perform()
bool perform() override
{
showCorrectTab();
if (vertical)
@ -340,7 +340,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
if (vertical)
@ -407,7 +407,7 @@ private:
oldState = comp->getScrollBarThickness();
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setScrollBarThickness (newState);
@ -415,7 +415,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setScrollBarThickness (newState);
@ -439,13 +439,13 @@ private:
choices.add ("Named content component");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
document.perform (new ViewportContentTypeChangeAction (component, *document.getComponentLayout(), newIndex),
"Change Viewport content type");
}
int getIndex() const
int getIndex() const override
{
return getViewportContentType (component);
}
@ -461,7 +461,7 @@ private:
oldValue = getViewportContentType (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
setViewportContentType (getComponent(), newValue);
@ -470,7 +470,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setViewportContentType (getComponent(), oldValue);
@ -538,7 +538,7 @@ private:
oldState = getViewportJucerComponentFile (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
setViewportJucerComponentFile (getComponent(), newState);
@ -546,7 +546,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setViewportJucerComponentFile (getComponent(), oldState);
@ -589,7 +589,7 @@ private:
oldValue = getViewportGenericComponentClass (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
setViewportGenericComponentClass (getComponent(), newValue);
@ -598,7 +598,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setViewportGenericComponentClass (getComponent(), oldValue);
@ -642,7 +642,7 @@ private:
oldValue = getViewportConstructorParams (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
setViewportConstructorParams (getComponent(), newValue);
@ -651,7 +651,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
setViewportConstructorParams (getComponent(), oldValue);

View file

@ -233,23 +233,23 @@ public:
document.addChangeListener (this);
}
~ButtonStatePaintEnabledProperty()
~ButtonStatePaintEnabledProperty() override
{
document.removeChangeListener (this);
}
void setState (bool newState)
void setState (bool newState) override
{
document.setStatePaintRoutineEnabled (stateMethod, newState);
}
bool getState() const
bool getState() const override
{
return document.isStatePaintRoutineEnabled (stateMethod);
}
private:
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}

View file

@ -32,38 +32,38 @@ class ButtonDocument : public JucerDocument
{
public:
ButtonDocument (SourceCodeDocument* cpp);
~ButtonDocument();
~ButtonDocument() override;
//==============================================================================
String getTypeName() const;
String getTypeName() const override;
JucerDocument* createCopy();
Component* createTestComponent (bool alwaysFillBackground);
JucerDocument* createCopy() override;
Component* createTestComponent (bool alwaysFillBackground) override;
int getNumPaintRoutines() const;
StringArray getPaintRoutineNames() const;
PaintRoutine* getPaintRoutine (int index) const;
int getNumPaintRoutines() const override;
StringArray getPaintRoutineNames() const override;
PaintRoutine* getPaintRoutine (int index) const override;
void setStatePaintRoutineEnabled (int index, bool b);
bool isStatePaintRoutineEnabled (int index) const;
int chooseBestEnabledPaintRoutine (int paintRoutineWanted) const;
ComponentLayout* getComponentLayout() const { return nullptr; }
ComponentLayout* getComponentLayout() const override { return nullptr; }
void addExtraClassProperties (PropertyPanel&);
void addExtraClassProperties (PropertyPanel&) override;
//==============================================================================
std::unique_ptr<XmlElement> createXml() const;
bool loadFromXml (const XmlElement&);
std::unique_ptr<XmlElement> createXml() const override;
bool loadFromXml (const XmlElement&) override;
void fillInGeneratedCode (GeneratedCode& code) const;
void fillInPaintCode (GeneratedCode& code) const;
void fillInGeneratedCode (GeneratedCode& code) const override;
void fillInPaintCode (GeneratedCode& code) const override;
void getOptionalMethods (StringArray& baseClasses,
StringArray& returnValues,
StringArray& methods,
StringArray& initialContents) const;
StringArray& initialContents) const override;
//==============================================================================
std::unique_ptr<PaintRoutine> paintRoutines[7];

View file

@ -32,26 +32,26 @@ class ComponentDocument : public JucerDocument
{
public:
ComponentDocument (SourceCodeDocument* cpp);
~ComponentDocument();
~ComponentDocument() override;
//==============================================================================
String getTypeName() const;
String getTypeName() const override;
JucerDocument* createCopy();
Component* createTestComponent (bool alwaysFillBackground);
JucerDocument* createCopy() override;
Component* createTestComponent (bool alwaysFillBackground) override;
int getNumPaintRoutines() const { return 1; }
StringArray getPaintRoutineNames() const { return StringArray ("Graphics"); }
PaintRoutine* getPaintRoutine (int index) const { return index == 0 ? backgroundGraphics.get() : nullptr; }
int getNumPaintRoutines() const override { return 1; }
StringArray getPaintRoutineNames() const override { return StringArray ("Graphics"); }
PaintRoutine* getPaintRoutine (int index) const override { return index == 0 ? backgroundGraphics.get() : nullptr; }
ComponentLayout* getComponentLayout() const { return components.get(); }
ComponentLayout* getComponentLayout() const override { return components.get(); }
//==============================================================================
std::unique_ptr<XmlElement> createXml() const;
bool loadFromXml (const XmlElement& xml);
std::unique_ptr<XmlElement> createXml() const override;
bool loadFromXml (const XmlElement& xml) override;
void fillInGeneratedCode (GeneratedCode& code) const;
void applyCustomPaintSnippets (StringArray&);
void fillInGeneratedCode (GeneratedCode& code) const override;
void applyCustomPaintSnippets (StringArray&) override;
private:
std::unique_ptr<ComponentLayout> components;

View file

@ -49,7 +49,7 @@ public:
choices.add ("Image Brush");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType());
@ -69,7 +69,7 @@ public:
listener.owner->setStrokeFill (fill, true);
}
int getIndex() const
int getIndex() const override
{
switch (isForStroke ? listener.owner->getStrokeType().fill.mode
: listener.owner->getFillType().mode)
@ -178,7 +178,7 @@ public:
listener.setPropertyToRefresh (*this);
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType());
@ -194,7 +194,7 @@ public:
listener.owner->setStrokeFill (fill, true);
}
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{
const JucerFillType fill (isForStroke ? listener.owner->getStrokeType().fill
: listener.owner->getFillType());
@ -220,8 +220,8 @@ public:
}
//==============================================================================
void setState (bool newState) { listener.owner->enableStroke (newState, true); }
bool getState() const { return listener.owner->isStrokeEnabled(); }
void setState (bool newState) override { listener.owner->enableStroke (newState, true); }
bool getState() const override { return listener.owner->isStrokeEnabled(); }
ElementListener<ColouredElement> listener;
};
@ -237,7 +237,7 @@ public:
listener.setPropertyToRefresh (*this);
}
void setValue (double newValue)
void setValue (double newValue) override
{
listener.owner->getDocument()->getUndoManager().undoCurrentTransactionOnly();
@ -247,7 +247,7 @@ public:
true);
}
double getValue() const { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
double getValue() const override { return listener.owner->getStrokeType().stroke.getStrokeThickness(); }
ElementListener<ColouredElement> listener;
};
@ -267,7 +267,7 @@ public:
choices.add ("beveled");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
const PathStrokeType::JointStyle joints[] = { PathStrokeType::mitered,
PathStrokeType::curved,
@ -285,7 +285,7 @@ public:
true);
}
int getIndex() const
int getIndex() const override
{
switch (listener.owner->getStrokeType().stroke.getJointStyle())
{
@ -316,7 +316,7 @@ public:
choices.add ("round");
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
const PathStrokeType::EndCapStyle ends[] = { PathStrokeType::butt,
PathStrokeType::square,
@ -334,7 +334,7 @@ public:
true);
}
int getIndex() const
int getIndex() const override
{
switch (listener.owner->getStrokeType().stroke.getEndStyle())
{
@ -362,7 +362,7 @@ public:
}
//==============================================================================
void setResource (const String& newName)
void setResource (const String& newName) override
{
if (element != nullptr)
{
@ -383,7 +383,7 @@ public:
}
}
String getResource() const
String getResource() const override
{
if (element == nullptr)
return {};
@ -414,7 +414,7 @@ public:
listener.setPropertyToRefresh (*this);
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
if (isForStroke)
{
@ -430,7 +430,7 @@ public:
}
}
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{
if (isForStroke)
return listener.owner->getStrokeType().fill.imageAnchor;
@ -455,7 +455,7 @@ public:
listener.setPropertyToRefresh (*this);
}
void setValue (double newValue)
void setValue (double newValue) override
{
if (listener.owner != nullptr)
{
@ -478,7 +478,7 @@ public:
}
}
double getValue() const
double getValue() const override
{
if (listener.owner == nullptr)
return 0;
@ -616,14 +616,14 @@ public:
oldState = element->getFillType();
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setFillType (newState, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setFillType (oldState, false);
@ -675,14 +675,14 @@ public:
oldState = element->isStrokeEnabled();
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->enableStroke (newState, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->enableStroke (oldState, false);
@ -732,14 +732,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setStrokeType (newState, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setStrokeType (oldState, false);
@ -778,14 +778,14 @@ public:
oldState = element->getStrokeType().fill;
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setStrokeFill (newState, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setStrokeFill (oldState, false);

View file

@ -41,7 +41,7 @@ public:
{
}
RelativePositionedRectangle getPosition()
RelativePositionedRectangle getPosition() override
{
ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
@ -53,7 +53,7 @@ public:
: e->getFillType().gradPos2;
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
ColouredElement* e = dynamic_cast<ColouredElement*> (owner);
@ -81,7 +81,7 @@ public:
}
}
void updatePosition()
void updatePosition() override
{
PointComponent::updatePosition();

View file

@ -59,7 +59,7 @@ public:
document.addChangeListener (this);
}
~ImageResourceProperty()
~ImageResourceProperty() override
{
document.removeChangeListener (this);
}
@ -70,7 +70,7 @@ public:
virtual String getResource() const = 0;
//==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
if (newIndex == 0)
{
@ -94,7 +94,7 @@ public:
}
}
int getIndex() const
int getIndex() const override
{
if (getResource().isEmpty())
return -1;
@ -102,7 +102,7 @@ public:
return choices.indexOf (getResource());
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}

View file

@ -101,14 +101,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setPosition (newState, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setPosition (oldState, false);
@ -128,14 +128,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setBounds (newBounds);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setBounds (oldBounds);
@ -159,7 +159,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -170,7 +170,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
@ -309,7 +309,7 @@ public:
listener.setPropertyToRefresh (*this);
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
if (element->getOwner()->getSelectedElements().getNumSelected() > 1)
positionOtherSelectedElements (getPosition(), newPos);
@ -317,7 +317,7 @@ public:
listener.owner->setPosition (newPos, true);
}
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{
return listener.owner->getPosition();
}

View file

@ -158,12 +158,12 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
element->convertToPath();
}
String getButtonText() const
String getButtonText() const override
{
return "convert to a path";
}

View file

@ -73,8 +73,8 @@ private:
{
UngroupProperty (PaintElementGroup* const);
void buttonClicked();
String getButtonText() const;
void buttonClicked() override;
String getButtonText() const override;
PaintElementGroup* element;
};

View file

@ -58,8 +58,8 @@ public:
public:
SetResourceAction (PaintElementImage* const, const String&);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private:
String newResource, oldResource;
@ -75,8 +75,8 @@ public:
public:
SetOpacityAction (PaintElementImage* const, double);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private:
double newOpacity, oldOpacity;
@ -96,8 +96,8 @@ public:
public:
SetStretchModeAction (PaintElementImage* const, StretchMode);
bool perform();
bool undo();
bool perform() override;
bool undo() override;
private:
StretchMode newValue, oldValue;
@ -124,8 +124,8 @@ private:
public:
ImageElementResourceProperty (PaintElementImage* const);
void setResource (const String&);
String getResource() const;
void setResource (const String&) override;
String getResource() const override;
};
//==============================================================================
@ -134,8 +134,8 @@ private:
public:
OpacityProperty (PaintElementImage* const);
void setValue (double);
double getValue() const;
void setValue (double) override;
double getValue() const override;
ElementListener<PaintElementImage> listener;
};
@ -145,8 +145,8 @@ private:
public:
StretchModeProperty (PaintElementImage* const);
void setIndex (int);
int getIndex() const;
void setIndex (int) override;
int getIndex() const override;
ElementListener<PaintElementImage> listener;
};
@ -156,8 +156,8 @@ private:
public:
ResetSizeProperty (PaintElementImage* const);
void buttonClicked();
String getButtonText() const;
void buttonClicked() override;
String getButtonText() const override;
private:
PaintElementImage* const element;

View file

@ -52,12 +52,12 @@ public:
{
}
bool perform()
bool perform() override
{
return changeTo (newValue);
}
bool undo()
bool undo() override
{
return changeTo (oldValue);
}
@ -748,14 +748,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setNonZeroWinding (newValue, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setNonZeroWinding (oldValue, false);
@ -846,7 +846,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -862,7 +862,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
@ -952,7 +952,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -963,7 +963,7 @@ public:
return path != nullptr;
}
bool undo()
bool undo() override
{
showCorrectTab();
@ -1292,17 +1292,17 @@ public:
owner->getDocument()->addChangeListener (this);
}
~PathPointPositionProperty()
~PathPointPositionProperty() override
{
owner->getDocument()->removeChangeListener (this);
}
void setPosition (const RelativePositionedRectangle& newPos)
void setPosition (const RelativePositionedRectangle& newPos) override
{
owner->setPoint (index, pointNumber, newPos, true);
}
RelativePositionedRectangle getPosition() const
RelativePositionedRectangle getPosition() const override
{
return owner->getPoint (index, pointNumber);
}
@ -1328,22 +1328,22 @@ public:
choices.add ("Subpath is open-ended");
}
~PathPointClosedProperty()
~PathPointClosedProperty() override
{
owner->getDocument()->removeChangeListener (this);
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
owner->setSubpathClosed (index, newIndex == 0, true);
}
int getIndex() const
int getIndex() const override
{
return owner->isSubpathClosed (index) ? 0 : 1;
}
@ -1364,12 +1364,12 @@ public:
{
}
void buttonClicked()
void buttonClicked() override
{
owner->addPoint (index, true);
}
String getButtonText() const { return "Add new point"; }
String getButtonText() const override { return "Add new point"; }
private:
PaintElementPath* const owner;

View file

@ -152,17 +152,17 @@ public:
PathPointComponent (PaintElementPath* const path_,
int index, int pointNumber);
~PathPointComponent();
~PathPointComponent() override;
void updatePosition();
void updatePosition() override;
void showPopupMenu();
void paint (Graphics& g);
void mouseDown (const MouseEvent& e);
void mouseDrag (const MouseEvent& e);
void mouseUp (const MouseEvent& e);
void paint (Graphics& g) override;
void mouseDown (const MouseEvent& e) override;
void mouseDrag (const MouseEvent& e) override;
void mouseUp (const MouseEvent& e) override;
void changeListenerCallback (ChangeBroadcaster*);
void changeListenerCallback (ChangeBroadcaster*) override;
private:
PaintElementPath* const path;

View file

@ -168,12 +168,12 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
element->convertToPath();
}
String getButtonText() const
String getButtonText() const override
{
return "convert to a path";
}

View file

@ -75,14 +75,14 @@ public:
oldSize = element->getCornerSize();
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setCornerSize (newSize, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setCornerSize (oldSize, false);
@ -251,12 +251,12 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
element->convertToPath();
}
String getButtonText() const
String getButtonText() const override
{
return "convert to a path";
}

View file

@ -176,14 +176,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setText (newText, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setText (oldText, false);
@ -224,14 +224,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setFont (newFont, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setFont (oldFont, false);
@ -270,14 +270,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setTypefaceName (newValue, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setTypefaceName (oldValue, false);
@ -317,14 +317,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getElement()->setJustification (newValue, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getElement()->setJustification (oldValue, false);
@ -430,16 +430,16 @@ private:
element->getDocument()->addChangeListener (this);
}
~FontNameProperty()
~FontNameProperty() override
{
element->getDocument()->removeChangeListener (this);
}
void setTypefaceName (const String& newFontName) { element->setTypefaceName (newFontName, true); }
String getTypefaceName() const { return element->getTypefaceName(); }
void setTypefaceName (const String& newFontName) override { element->setTypefaceName (newFontName, true); }
String getTypefaceName() const override { return element->getTypefaceName(); }
private:
void changeListenerCallback (ChangeBroadcaster*) { refresh(); }
void changeListenerCallback (ChangeBroadcaster*) override { refresh(); }
PaintElementText* const element;
};
@ -458,7 +458,7 @@ private:
updateStylesList (element->getTypefaceName());
}
~FontStyleProperty()
~FontStyleProperty() override
{
element->getDocument()->removeChangeListener (this);
}
@ -485,7 +485,7 @@ private:
refresh();
}
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
Font f (element->getFont());
@ -505,7 +505,7 @@ private:
element->setFont (f, true);
}
int getIndex() const
int getIndex() const override
{
auto f = element->getFont();
@ -526,7 +526,7 @@ private:
}
private:
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
updateStylesList (element->getTypefaceName());
}
@ -656,12 +656,12 @@ private:
{
}
void buttonClicked()
void buttonClicked() override
{
element->convertToPath();
}
String getButtonText() const
String getButtonText() const override
{
return "convert text to a path";
}

View file

@ -78,7 +78,7 @@ public:
}
}
int getSizeInUnits() { return 2; }
int getSizeInUnits() override { return 2; }
protected:
PaintRoutine& routine;

View file

@ -44,12 +44,12 @@ public:
document.addChangeListener (this);
}
~ComponentBooleanProperty()
~ComponentBooleanProperty() override
{
document.removeChangeListener (this);
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}

View file

@ -42,12 +42,12 @@ public:
document.addChangeListener (this);
}
~ComponentChoiceProperty()
~ComponentChoiceProperty() override
{
document.removeChangeListener (this);
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}

View file

@ -44,12 +44,12 @@ public:
document.addChangeListener (this);
}
~ComponentColourProperty()
~ComponentColourProperty() override
{
document.removeChangeListener (this);
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}
@ -76,12 +76,12 @@ public:
}
//==============================================================================
Colour getColour() const
Colour getColour() const override
{
return component->findColour (colourId);
}
void setColour (Colour newColour)
void setColour (Colour newColour) override
{
if (component->findColour (colourId) != newColour)
{
@ -96,7 +96,7 @@ public:
}
}
void resetToDefault()
void resetToDefault() override
{
document.getUndoManager().undoCurrentTransactionOnly();
@ -126,7 +126,7 @@ private:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -142,7 +142,7 @@ private:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();

View file

@ -44,12 +44,12 @@ public:
document.addChangeListener (this);
}
~ComponentTextProperty()
~ComponentTextProperty() override
{
document.removeChangeListener (this);
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}

View file

@ -63,7 +63,7 @@ public:
virtual String getTypefaceName() const = 0;
//==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
String type (choices [newIndex]);
@ -74,7 +74,7 @@ public:
setTypefaceName (type);
}
int getIndex() const
int getIndex() const override
{
return choices.indexOf (getTypefaceName());
}

View file

@ -58,7 +58,7 @@ public:
virtual Justification getJustification() const = 0;
//==============================================================================
void setIndex (int newIndex)
void setIndex (int newIndex) override
{
const int types[] = { Justification::centred,
Justification::centredLeft,
@ -77,7 +77,7 @@ public:
}
}
int getIndex() const
int getIndex() const override
{
const int types[] = { Justification::centred,
Justification::centredLeft,

View file

@ -175,7 +175,7 @@ public:
}
}
void changeListenerCallback (ChangeBroadcaster*)
void changeListenerCallback (ChangeBroadcaster*) override
{
refresh();
}
@ -392,7 +392,7 @@ public:
});
}
void resized()
void resized() override
{
const Rectangle<int> r (getLookAndFeel().getPropertyComponentContentPosition (*this));
@ -402,7 +402,7 @@ public:
textEditor->setBounds (r.getX(), r.getY(), button.getX() - r.getX(), r.getHeight());
}
void refresh()
void refresh() override
{
textEditor->setText (getText(), dontSendNotification);
}

View file

@ -41,17 +41,17 @@ public:
{
}
~ComponentLayoutPanel()
~ComponentLayoutPanel() override
{
deleteAllChildren();
}
void updatePropertiesList()
void updatePropertiesList() override
{
((LayoutPropsPanel*) propsPanel)->updateList();
}
Rectangle<int> getComponentArea() const
Rectangle<int> getComponentArea() const override
{
return ((ComponentLayoutEditor*) editor)->getComponentArea();
}

View file

@ -37,7 +37,7 @@ public:
updateBounds (content.get());
}
void childBoundsChanged (Component* child)
void childBoundsChanged (Component* child) override
{
updateBounds (child);
}
@ -69,7 +69,7 @@ public:
{
}
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel)
void mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) override
{
if (e.mods.isCtrlDown() || e.mods.isAltDown() || e.mods.isCommandDown())
mouseMagnify (e, 1.0f / (1.0f - wheel.deltaY));
@ -77,7 +77,7 @@ public:
Viewport::mouseWheelMove (e, wheel);
}
void mouseMagnify (const MouseEvent& e, float factor)
void mouseMagnify (const MouseEvent& e, float factor) override
{
panel->setZoom (panel->getZoom() * factor, e.x, e.y);
}
@ -116,7 +116,7 @@ private:
setAlwaysOnTop (true);
}
void mouseDown (const MouseEvent&)
void mouseDown (const MouseEvent&) override
{
if (Viewport* viewport = findParentComponentOfClass<Viewport>())
{
@ -125,7 +125,7 @@ private:
}
}
void mouseDrag (const MouseEvent& e)
void mouseDrag (const MouseEvent& e) override
{
if (Viewport* viewport = findParentComponentOfClass<Viewport>())
viewport->setViewPosition (jlimit (0, jmax (0, viewport->getViewedComponent()->getWidth() - viewport->getViewWidth()),

View file

@ -294,8 +294,8 @@ private:
choices.add ("Keep component size fixed");
}
void setIndex (int newIndex) { document.setFixedSize (newIndex != 0); }
int getIndex() const { return document.isFixedSize() ? 1 : 0; }
void setIndex (int newIndex) override { document.setFixedSize (newIndex != 0); }
int getIndex() const override { return document.isFixedSize() ? 1 : 0; }
};
//==============================================================================

View file

@ -41,25 +41,25 @@ public:
PaintRoutineEditor (PaintRoutine& graphics,
JucerDocument& document,
JucerDocumentEditor* const docHolder);
~PaintRoutineEditor();
~PaintRoutineEditor() override;
//==============================================================================
void paint (Graphics& g);
void paintOverChildren (Graphics& g);
void resized();
void changeListenerCallback (ChangeBroadcaster*);
void paint (Graphics& g) override;
void paintOverChildren (Graphics& g) override;
void resized() override;
void changeListenerCallback (ChangeBroadcaster*) override;
void mouseDown (const MouseEvent& e);
void mouseDrag (const MouseEvent& e);
void mouseUp (const MouseEvent& e);
void visibilityChanged();
void mouseDown (const MouseEvent& e) override;
void mouseDrag (const MouseEvent& e) override;
void mouseUp (const MouseEvent& e) override;
void visibilityChanged() override;
void findLassoItemsInArea (Array <PaintElement*>& results, const Rectangle<int>& area);
void findLassoItemsInArea (Array <PaintElement*>& results, const Rectangle<int>& area) override;
SelectedItemSet <PaintElement*>& getLassoSelection();
SelectedItemSet <PaintElement*>& getLassoSelection() override;
bool isInterestedInFileDrag (const StringArray& files);
void filesDropped (const StringArray& filenames, int x, int y);
bool isInterestedInFileDrag (const StringArray& files) override;
void filesDropped (const StringArray& filenames, int x, int y) override;
Rectangle<int> getComponentArea() const;

View file

@ -33,12 +33,12 @@ class PaintRoutinePanel : public EditingPanelBase
{
public:
PaintRoutinePanel (JucerDocument&, PaintRoutine&, JucerDocumentEditor*);
~PaintRoutinePanel();
~PaintRoutinePanel() override;
PaintRoutine& getPaintRoutine() const noexcept { return routine; }
void updatePropertiesList();
Rectangle<int> getComponentArea() const;
void updatePropertiesList() override;
Rectangle<int> getComponentArea() const override;
private:
PaintRoutine& routine;

View file

@ -49,7 +49,7 @@ public:
reloadButton.setVisible (document.getResources() [row] != nullptr);
}
void resized()
void resized() override
{
reloadButton.setBoundsInset (BorderSize<int> (2));
}

View file

@ -78,7 +78,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
Component* const newComp = layout.addComponentFromXml (*xml, false);
@ -89,14 +89,14 @@ public:
return indexRef >= 0;
}
bool undo()
bool undo() override
{
showCorrectTab();
layout.removeComponent (layout.getComponent (indexRef), false);
return true;
}
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
int& indexRef;
@ -130,14 +130,14 @@ public:
oldIndex = l.indexOfComponent (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
layout.removeComponent (getComponent(), false);
return true;
}
bool undo()
bool undo() override
{
Component* c = layout.addComponentFromXml (*xml, false);
jassert (c != nullptr);
@ -183,7 +183,7 @@ public:
oldIndex = l.indexOfComponent (comp);
}
bool perform()
bool perform() override
{
showCorrectTab();
Component* comp = layout.getComponent (oldIndex);
@ -192,7 +192,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
layout.moveComponentZOrder (newIndex, oldIndex);
@ -599,14 +599,14 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
layout.setComponentPosition (getComponent(), newPos, false);
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
layout.setComponentPosition (getComponent(), oldPos, false);
@ -630,7 +630,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
getComponent()->setBounds (newBounds);
@ -639,7 +639,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
getComponent()->setBounds (oldBounds);

View file

@ -89,7 +89,7 @@ public:
{
}
bool perform()
bool perform() override
{
showCorrectTab();
PaintElement* newElement = routine.addElementFromXml (*xml, -1, false);
@ -100,14 +100,14 @@ public:
return indexAdded >= 0;
}
bool undo()
bool undo() override
{
showCorrectTab();
routine.removeElement (routine.getElement (indexAdded), false);
return true;
}
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
int indexAdded;
@ -172,21 +172,21 @@ public:
oldIndex = routine.indexOfElement (element);
}
bool perform()
bool perform() override
{
showCorrectTab();
routine.removeElement (getElement(), false);
return true;
}
bool undo()
bool undo() override
{
PaintElement* newElement = routine.addElementFromXml (*xml, oldIndex, false);
showCorrectTab();
return newElement != nullptr;
}
int getSizeInUnits() { return 10; }
int getSizeInUnits() override { return 10; }
private:
std::unique_ptr<XmlElement> xml;
@ -228,7 +228,7 @@ public:
oldIndex = routine.indexOfElement (element);
}
bool perform()
bool perform() override
{
showCorrectTab();
@ -238,7 +238,7 @@ public:
return true;
}
bool undo()
bool undo() override
{
showCorrectTab();
routine.moveElementZOrder (newIndex, oldIndex);

View file

@ -131,7 +131,7 @@ public:
virtual void canCreateMessageBox (CreatorFunction) = 0;
};
void handleAsyncUpdate()
void handleAsyncUpdate() override
{
schedule();
}

View file

@ -59,7 +59,7 @@ private:
//==============================================================================
struct LabelLookAndFeel final : public ProjucerLookAndFeel
{
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) {}
void drawPropertyComponentLabel (Graphics&, int, int, PropertyComponent&) override {}
};
void lookAndFeelChanged() override

View file

@ -979,7 +979,7 @@ public:
#endif
}
~ALSAAudioIODeviceType()
~ALSAAudioIODeviceType() override
{
#if ! JUCE_ALSA_LOGGING
snd_lib_error_set_handler (nullptr);
@ -989,7 +989,7 @@ public:
}
//==============================================================================
void scanForDevices()
void scanForDevices() override
{
if (hasScanned)
return;
@ -1011,14 +1011,14 @@ public:
outputNames.appendNumbersToDuplicates (false, true);
}
StringArray getDeviceNames (bool wantInputNames) const
StringArray getDeviceNames (bool wantInputNames) const override
{
jassert (hasScanned); // need to call scanForDevices() before doing this
return wantInputNames ? inputNames : outputNames;
}
int getDefaultDeviceIndex (bool forInput) const
int getDefaultDeviceIndex (bool forInput) const override
{
jassert (hasScanned); // need to call scanForDevices() before doing this
@ -1026,9 +1026,9 @@ public:
return idx >= 0 ? idx : 0;
}
bool hasSeparateInputsAndOutputs() const { return true; }
bool hasSeparateInputsAndOutputs() const override { return true; }
int getIndexOfDevice (AudioIODevice* device, bool asInput) const
int getIndexOfDevice (AudioIODevice* device, bool asInput) const override
{
jassert (hasScanned); // need to call scanForDevices() before doing this
@ -1040,7 +1040,7 @@ public:
}
AudioIODevice* createDevice (const String& outputDeviceName,
const String& inputDeviceName)
const String& inputDeviceName) override
{
jassert (hasScanned); // need to call scanForDevices() before doing this

View file

@ -564,13 +564,13 @@ private:
{
SessionEventCallback (WASAPIDeviceBase& d) : owner (d) {}
JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnIconPathChanged (LPCWSTR, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) { return S_OK; }
JUCE_COMRESULT OnDisplayNameChanged (LPCWSTR, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnIconPathChanged (LPCWSTR, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnSimpleVolumeChanged (float, BOOL, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnChannelVolumeChanged (DWORD, float*, DWORD, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnGroupingParamChanged (LPCGUID, LPCGUID) override { return S_OK; }
JUCE_COMRESULT OnStateChanged (AudioSessionState state)
JUCE_COMRESULT OnStateChanged (AudioSessionState state) override
{
switch (state)
{
@ -588,7 +588,7 @@ private:
return S_OK;
}
JUCE_COMRESULT OnSessionDisconnected (AudioSessionDisconnectReason reason)
JUCE_COMRESULT OnSessionDisconnected (AudioSessionDisconnectReason reason) override
{
if (reason == DisconnectReasonFormatChanged)
owner.deviceSampleRateChanged();
@ -833,7 +833,7 @@ private:
return result;
}
DWORD getStreamFlags()
DWORD getStreamFlags() const
{
DWORD streamFlags = 0x40000; /*AUDCLNT_STREAMFLAGS_EVENTCALLBACK*/
@ -1199,8 +1199,8 @@ private:
//==============================================================================
class WASAPIAudioIODevice final : public AudioIODevice,
public Thread,
private AsyncUpdater
public Thread,
private AsyncUpdater
{
public:
WASAPIAudioIODevice (const String& deviceName,
@ -1821,11 +1821,11 @@ private:
explicit ChangeNotificationClient (WASAPIAudioIODeviceType* d)
: ComBaseClassHelper (0), device (d) {}
JUCE_COMRESULT OnDeviceAdded (LPCWSTR) { return notify(); }
JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) { return notify(); }
JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) { return notify(); }
JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) { return notify(); }
JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) { return notify(); }
JUCE_COMRESULT OnDeviceAdded (LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) override { return notify(); }
JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) override { return notify(); }
JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) override { return notify(); }
private:
WeakReference<WASAPIAudioIODeviceType> device;

View file

@ -37,15 +37,15 @@ public:
{
}
JUCE_COMRESULT Commit (DWORD) { return S_OK; }
JUCE_COMRESULT Write (const void*, ULONG, ULONG*) { return E_NOTIMPL; }
JUCE_COMRESULT Clone (IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT SetSize (ULARGE_INTEGER) { return E_NOTIMPL; }
JUCE_COMRESULT Revert() { return E_NOTIMPL; }
JUCE_COMRESULT LockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Commit (DWORD) override { return S_OK; }
JUCE_COMRESULT Write (const void*, ULONG, ULONG*) override { return E_NOTIMPL; }
JUCE_COMRESULT Clone (IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT SetSize (ULARGE_INTEGER) override { return E_NOTIMPL; }
JUCE_COMRESULT Revert() override { return E_NOTIMPL; }
JUCE_COMRESULT LockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Read (void* dest, ULONG numBytes, ULONG* bytesRead)
JUCE_COMRESULT Read (void* dest, ULONG numBytes, ULONG* bytesRead) override
{
auto numRead = source.read (dest, (size_t) numBytes);
@ -55,7 +55,7 @@ public:
return (numRead == (int) numBytes) ? S_OK : S_FALSE;
}
JUCE_COMRESULT Seek (LARGE_INTEGER position, DWORD origin, ULARGE_INTEGER* resultPosition)
JUCE_COMRESULT Seek (LARGE_INTEGER position, DWORD origin, ULARGE_INTEGER* resultPosition) override
{
auto newPos = (int64) position.QuadPart;
@ -80,7 +80,7 @@ public:
}
JUCE_COMRESULT CopyTo (IStream* destStream, ULARGE_INTEGER numBytesToDo,
ULARGE_INTEGER* bytesRead, ULARGE_INTEGER* bytesWritten)
ULARGE_INTEGER* bytesRead, ULARGE_INTEGER* bytesWritten) override
{
uint64 totalCopied = 0;
auto numBytes = (int64) numBytesToDo.QuadPart;
@ -105,7 +105,7 @@ public:
return S_OK;
}
JUCE_COMRESULT Stat (STATSTG* stat, DWORD)
JUCE_COMRESULT Stat (STATSTG* stat, DWORD) override
{
if (stat == nullptr)
return STG_E_INVALIDPOINTER;
@ -319,7 +319,7 @@ WindowsMediaAudioFormat::WindowsMediaAudioFormat()
{
}
WindowsMediaAudioFormat::~WindowsMediaAudioFormat() {}
WindowsMediaAudioFormat::~WindowsMediaAudioFormat() = default;
Array<int> WindowsMediaAudioFormat::getPossibleSampleRates() { return {}; }
Array<int> WindowsMediaAudioFormat::getPossibleBitDepths() { return {}; }

View file

@ -613,7 +613,7 @@ private:
{
ScanJob (Scanner& s) : ThreadPoolJob ("pluginscan"), scanner (s) {}
JobStatus runJob()
JobStatus runJob() override
{
while (scanner.doNextScan() && ! shouldExit())
{}

View file

@ -87,7 +87,7 @@ namespace CDBurnerHelpers
}
//==============================================================================
class AudioCDBurner::Pimpl : public ComBaseClassHelper <IDiscMasterProgressEvents>,
class AudioCDBurner::Pimpl : public ComBaseClassHelper<IDiscMasterProgressEvents>,
public Timer
{
public:
@ -104,8 +104,6 @@ public:
startTimer (2000);
}
~Pimpl() {}
void releaseObjects()
{
discRecorder->Close();
@ -116,7 +114,7 @@ public:
Release();
}
JUCE_COMRESULT QueryCancel (boolean* pbCancel)
JUCE_COMRESULT QueryCancel (boolean* pbCancel) override
{
if (listener != nullptr && ! shouldCancel)
shouldCancel = listener->audioCDBurnProgress (progress);
@ -126,7 +124,7 @@ public:
return S_OK;
}
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal)
JUCE_COMRESULT NotifyBlockProgress (long nCompleted, long nTotal) override
{
progress = nCompleted / (float) nTotal;
shouldCancel = listener != nullptr && listener->audioCDBurnProgress (progress);
@ -134,13 +132,13 @@ public:
return E_NOTIMPL;
}
JUCE_COMRESULT NotifyPnPActivity (void) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPnPActivity (void) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyAddProgress (long /*nCompletedSteps*/, long /*nTotalSteps*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyTrackProgress (long /*nCurrentTrack*/, long /*nTotalTracks*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyPreparingBurn (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyClosingDisc (long /*nEstimatedSeconds*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyBurnComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
JUCE_COMRESULT NotifyEraseComplete (HRESULT /*status*/) override { return E_NOTIMPL; }
class ScopedDiscOpener
{
@ -173,30 +171,34 @@ public:
return readOnlyDiskPresent;
}
int getIntProperty (const LPOLESTR name, const int defaultReturn) const
int getIntProperty (const wchar_t* name, const int defaultReturn) const
{
std::wstring copy { name };
ComSmartPtr<IPropertyStorage> prop;
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
return defaultReturn;
PROPSPEC iPropSpec;
iPropSpec.ulKind = PRSPEC_LPWSTR;
iPropSpec.lpwstr = name;
iPropSpec.lpwstr = copy.data();
PROPVARIANT iPropVariant;
return FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant))
? defaultReturn : (int) iPropVariant.lVal;
}
bool setIntProperty (const LPOLESTR name, const int value) const
bool setIntProperty (const wchar_t* name, const int value) const
{
std::wstring copy { name };
ComSmartPtr<IPropertyStorage> prop;
if (FAILED (discRecorder->GetRecorderProperties (prop.resetAndGetPointerAddress())))
return false;
PROPSPEC iPropSpec;
iPropSpec.ulKind = PRSPEC_LPWSTR;
iPropSpec.lpwstr = name;
iPropSpec.lpwstr = copy.data();
PROPVARIANT iPropVariant;
if (FAILED (prop->ReadMultiple (1, &iPropSpec, &iPropVariant)))
@ -389,7 +391,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples)
buffer.clear (bytesPerBlock);
AudioData::interleaveSamples (AudioData::NonInterleavedSource<AudioData::Float32, AudioData::NativeEndian> { sourceBuffer.getArrayOfReadPointers(), 2 },
AudioData::InterleavedDest<AudioData::Int16, Audiodata::LittleEndian> { reinterpret_cast<uint16*> (buffer), 2 },
AudioData::InterleavedDest<AudioData::Int16, AudioData::LittleEndian> { reinterpret_cast<uint16*> (buffer.get()), 2 },
samplesPerBlock);
hr = pimpl->redbook->AddAudioTrackBlocks (buffer, bytesPerBlock);

View file

@ -324,9 +324,9 @@ void findCDDevices (Array<CDDeviceDescription>& list)
if (h != INVALID_HANDLE_VALUE)
{
char buffer[100] = { 0 };
char buffer[100]{};
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p = { 0 };
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p{};
p.spt.Length = sizeof (SCSI_PASS_THROUGH);
p.spt.CdbLength = 6;
p.spt.SenseInfoLength = 24;
@ -348,7 +348,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
dev.scsiDriveLetter = driveLetter;
dev.createDescription (buffer);
SCSI_ADDRESS scsiAddr = { 0 };
SCSI_ADDRESS scsiAddr{};
scsiAddr.Length = sizeof (scsiAddr);
if (DeviceIoControl (h, IOCTL_SCSI_GET_ADDRESS,
@ -371,7 +371,7 @@ void findCDDevices (Array<CDDeviceDescription>& list)
DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driveLetter,
HANDLE& deviceHandle, const bool retryOnFailure)
{
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s = { 0 };
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER s{};
s.spt.Length = sizeof (SCSI_PASS_THROUGH);
s.spt.CdbLength = srb->SRB_CDBLen;
@ -798,7 +798,7 @@ int CDController::getLastIndex()
//==============================================================================
bool CDDeviceHandle::readTOC (TOC* lpToc)
{
SRB_ExecSCSICmd s = { 0 };
SRB_ExecSCSICmd s{};
s.SRB_Cmd = SC_EXEC_SCSI_CMD;
s.SRB_HaID = info.ha;
s.SRB_Target = info.tgt;
@ -872,7 +872,7 @@ void CDDeviceHandle::openDrawer (bool shouldBeOpen)
}
}
SRB_ExecSCSICmd s = { 0 };
SRB_ExecSCSICmd s{};
s.SRB_Cmd = SC_EXEC_SCSI_CMD;
s.SRB_HaID = info.ha;
s.SRB_Target = info.tgt;
@ -1134,7 +1134,7 @@ bool AudioCDReader::readSamples (int* const* destSamples, int numDestChannels, i
bool AudioCDReader::isCDStillPresent() const
{
using namespace CDReaderHelpers;
TOC toc = { 0 };
TOC toc{};
return static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc);
}
@ -1144,7 +1144,7 @@ void AudioCDReader::refreshTrackLengths()
trackStartSamples.clear();
zeromem (audioTracks, sizeof (audioTracks));
TOC toc = { 0 };
TOC toc{};
if (static_cast<CDDeviceWrapper*> (handle)->deviceHandle.readTOC (&toc))
{

View file

@ -44,7 +44,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wcast-align",
"-Wswitch-default",
"-Wswitch-enum",
"-Wunused-but-set-variable",
"-Wzero-as-null-pointer-constant")
"-Wzero-as-null-pointer-constant",
"-Wsuggest-override")
#include <cstdarg>

View file

@ -61,7 +61,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wmaybe-uninitialized",
"-Wshadow-field",
"-Wsign-conversion",
"-Wzero-as-null-pointer-constant")
"-Wzero-as-null-pointer-constant",
"-Wsuggest-override")
#include <climits>
#include <cfloat>

View file

@ -183,12 +183,12 @@ public:
startThread();
}
~WriteThread()
~WriteThread() override
{
stopThread (5000);
}
void run()
void run() override
{
int n = 0;

View file

@ -110,13 +110,13 @@ struct Expression::Helpers
Constant (double val, bool resolutionTarget)
: value (val), isResolutionTarget (resolutionTarget) {}
Type getType() const noexcept { return constantType; }
Term* clone() const { return new Constant (value, isResolutionTarget); }
TermPtr resolve (const Scope&, int) { return *this; }
double toDouble() const { return value; }
TermPtr negated() { return *new Constant (-value, isResolutionTarget); }
Type getType() const noexcept override { return constantType; }
Term* clone() const override { return new Constant (value, isResolutionTarget); }
TermPtr resolve (const Scope&, int) override { return *this; }
double toDouble() const override { return value; }
TermPtr negated() override { return *new Constant (-value, isResolutionTarget); }
String toString() const
String toString() const override
{
String s (value);
if (isResolutionTarget)
@ -138,25 +138,25 @@ struct Expression::Helpers
jassert (left != nullptr && right != nullptr);
}
int getInputIndexFor (const Term* possibleInput) const
int getInputIndexFor (const Term* possibleInput) const override
{
return possibleInput == left ? 0 : (possibleInput == right ? 1 : -1);
}
Type getType() const noexcept { return operatorType; }
int getNumInputs() const { return 2; }
Term* getInput (int index) const { return index == 0 ? left.get() : (index == 1 ? right.get() : nullptr); }
Type getType() const noexcept override { return operatorType; }
int getNumInputs() const override { return 2; }
Term* getInput (int index) const override { return index == 0 ? left.get() : (index == 1 ? right.get() : nullptr); }
virtual double performFunction (double left, double right) const = 0;
virtual void writeOperator (String& dest) const = 0;
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{
return *new Constant (performFunction (left ->resolve (scope, recursionDepth)->toDouble(),
right->resolve (scope, recursionDepth)->toDouble()), false);
}
String toString() const
String toString() const override
{
String s;
auto ourPrecendence = getOperatorPrecedence();
@ -198,25 +198,25 @@ struct Expression::Helpers
public:
explicit SymbolTerm (const String& sym) : symbol (sym) {}
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
return scope.getSymbolValue (symbol).term->resolve (scope, recursionDepth + 1);
}
Type getType() const noexcept { return symbolType; }
Term* clone() const { return new SymbolTerm (symbol); }
String toString() const { return symbol; }
String getName() const { return symbol; }
Type getType() const noexcept override { return symbolType; }
Term* clone() const override { return new SymbolTerm (symbol); }
String toString() const override { return symbol; }
String getName() const override { return symbol; }
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth)
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
visitor.useSymbol (Symbol (scope.getScopeUID(), symbol));
scope.getSymbolValue (symbol).term->visitAllSymbols (visitor, scope, recursionDepth + 1);
}
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/)
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int /*recursionDepth*/) override
{
if (oldSymbol.symbolName == symbol && scope.getScopeUID() == oldSymbol.scopeUID)
symbol = newName;
@ -235,13 +235,13 @@ struct Expression::Helpers
: functionName (name), parameters (params)
{}
Type getType() const noexcept { return functionType; }
Term* clone() const { return new Function (functionName, parameters); }
int getNumInputs() const { return parameters.size(); }
Term* getInput (int i) const { return parameters.getReference (i).term.get(); }
String getName() const { return functionName; }
Type getType() const noexcept override { return functionType; }
Term* clone() const override { return new Function (functionName, parameters); }
int getNumInputs() const override { return parameters.size(); }
Term* getInput (int i) const override { return parameters.getReference (i).term.get(); }
String getName() const override { return functionName; }
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
double result = 0;
@ -264,7 +264,7 @@ struct Expression::Helpers
return *new Constant (result, false);
}
int getInputIndexFor (const Term* possibleInput) const
int getInputIndexFor (const Term* possibleInput) const override
{
for (int i = 0; i < parameters.size(); ++i)
if (parameters.getReference (i).term == possibleInput)
@ -273,7 +273,7 @@ struct Expression::Helpers
return -1;
}
String toString() const
String toString() const override
{
if (parameters.size() == 0)
return functionName + "()";
@ -302,7 +302,7 @@ struct Expression::Helpers
public:
DotOperator (SymbolTerm* l, TermPtr r) : BinaryTerm (TermPtr (l), r) {}
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
@ -311,13 +311,13 @@ struct Expression::Helpers
return visitor.output;
}
Term* clone() const { return new DotOperator (getSymbol(), *right); }
String getName() const { return "."; }
int getOperatorPrecedence() const { return 1; }
void writeOperator (String& dest) const { dest << '.'; }
double performFunction (double, double) const { return 0.0; }
Term* clone() const override { return new DotOperator (getSymbol(), *right); }
String getName() const override { return "."; }
int getOperatorPrecedence() const override { return 1; }
void writeOperator (String& dest) const override { dest << '.'; }
double performFunction (double, double) const override { return 0.0; }
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth)
void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
visitor.useSymbol (Symbol (scope.getScopeUID(), getSymbol()->symbol));
@ -331,7 +331,7 @@ struct Expression::Helpers
catch (...) {}
}
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int recursionDepth)
void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int recursionDepth) override
{
checkRecursionDepth (recursionDepth);
getSymbol()->renameSymbol (oldSymbol, newName, scope, recursionDepth);
@ -353,7 +353,7 @@ struct Expression::Helpers
EvaluationVisitor (const TermPtr& t, const int recursion)
: input (t), output (t), recursionCount (recursion) {}
void visit (const Scope& scope) { output = input->resolve (scope, recursionCount); }
void visit (const Scope& scope) override { output = input->resolve (scope, recursionCount); }
const TermPtr input;
TermPtr output;
@ -369,7 +369,7 @@ struct Expression::Helpers
SymbolVisitingVisitor (const TermPtr& t, SymbolVisitor& v, const int recursion)
: input (t), visitor (v), recursionCount (recursion) {}
void visit (const Scope& scope) { input->visitAllSymbols (visitor, scope, recursionCount); }
void visit (const Scope& scope) override { input->visitAllSymbols (visitor, scope, recursionCount); }
private:
const TermPtr input;
@ -385,7 +385,7 @@ struct Expression::Helpers
SymbolRenamingVisitor (const TermPtr& t, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_)
: input (t), symbol (symbol_), newName (newName_), recursionCount (recursionCount_) {}
void visit (const Scope& scope) { input->renameSymbol (symbol, newName, scope, recursionCount); }
void visit (const Scope& scope) override { input->renameSymbol (symbol, newName, scope, recursionCount); }
private:
const TermPtr input;
@ -410,21 +410,21 @@ struct Expression::Helpers
jassert (t != nullptr);
}
Type getType() const noexcept { return operatorType; }
int getInputIndexFor (const Term* possibleInput) const { return possibleInput == input ? 0 : -1; }
int getNumInputs() const { return 1; }
Term* getInput (int index) const { return index == 0 ? input.get() : nullptr; }
Term* clone() const { return new Negate (*input->clone()); }
Type getType() const noexcept override { return operatorType; }
int getInputIndexFor (const Term* possibleInput) const override { return possibleInput == input ? 0 : -1; }
int getNumInputs() const override { return 1; }
Term* getInput (int index) const override { return index == 0 ? input.get() : nullptr; }
Term* clone() const override { return new Negate (*input->clone()); }
TermPtr resolve (const Scope& scope, int recursionDepth)
TermPtr resolve (const Scope& scope, int recursionDepth) override
{
return *new Constant (-input->resolve (scope, recursionDepth)->toDouble(), false);
}
String getName() const { return "-"; }
TermPtr negated() { return input; }
String getName() const override { return "-"; }
TermPtr negated() override { return input; }
TermPtr createTermToEvaluateInput (const Scope& scope, [[maybe_unused]] const Term* t, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, [[maybe_unused]] const Term* t, double overallTarget, Term* topLevelTerm) const override
{
jassert (t == input);
@ -434,7 +434,7 @@ struct Expression::Helpers
: dest->createTermToEvaluateInput (scope, this, overallTarget, topLevelTerm));
}
String toString() const
String toString() const override
{
if (input->getOperatorPrecedence() > 0)
return "-(" + input->toString() + ")";
@ -452,13 +452,13 @@ struct Expression::Helpers
public:
Add (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Add (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs + rhs; }
int getOperatorPrecedence() const { return 3; }
String getName() const { return "+"; }
void writeOperator (String& dest) const { dest << " + "; }
Term* clone() const override { return new Add (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs + rhs; }
int getOperatorPrecedence() const override { return 3; }
String getName() const override { return "+"; }
void writeOperator (String& dest) const override { dest << " + "; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
return *new Subtract (newDest, *(input == left ? right : left)->clone());
@ -476,13 +476,13 @@ struct Expression::Helpers
public:
Subtract (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Subtract (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs - rhs; }
int getOperatorPrecedence() const { return 3; }
String getName() const { return "-"; }
void writeOperator (String& dest) const { dest << " - "; }
Term* clone() const override { return new Subtract (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs - rhs; }
int getOperatorPrecedence() const override { return 3; }
String getName() const override { return "-"; }
void writeOperator (String& dest) const override { dest << " - "; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
{
@ -505,13 +505,13 @@ struct Expression::Helpers
public:
Multiply (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Multiply (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs * rhs; }
String getName() const { return "*"; }
void writeOperator (String& dest) const { dest << " * "; }
int getOperatorPrecedence() const { return 2; }
Term* clone() const override { return new Multiply (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs * rhs; }
String getName() const override { return "*"; }
void writeOperator (String& dest) const override { dest << " * "; }
int getOperatorPrecedence() const override { return 2; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{
if (auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm))
return *new Divide (newDest, *(input == left ? right : left)->clone());
@ -528,13 +528,13 @@ struct Expression::Helpers
public:
Divide (TermPtr l, TermPtr r) : BinaryTerm (l, r) {}
Term* clone() const { return new Divide (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const { return lhs / rhs; }
String getName() const { return "/"; }
void writeOperator (String& dest) const { dest << " / "; }
int getOperatorPrecedence() const { return 2; }
Term* clone() const override { return new Divide (*left->clone(), *right->clone()); }
double performFunction (double lhs, double rhs) const override { return lhs / rhs; }
String getName() const override { return "/"; }
void writeOperator (String& dest) const override { dest << " / "; }
int getOperatorPrecedence() const override { return 2; }
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const
TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input, double overallTarget, Term* topLevelTerm) const override
{
auto newDest = createDestinationTerm (scope, input, overallTarget, topLevelTerm);
@ -625,7 +625,7 @@ struct Expression::Helpers
{
public:
SymbolCheckVisitor (const Symbol& s) : symbol (s) {}
void useSymbol (const Symbol& s) { wasFound = wasFound || s == symbol; }
void useSymbol (const Symbol& s) override { wasFound = wasFound || s == symbol; }
bool wasFound = false;
@ -640,7 +640,7 @@ struct Expression::Helpers
{
public:
SymbolListVisitor (Array<Symbol>& list_) : list (list_) {}
void useSymbol (const Symbol& s) { list.addIfNotAlreadyThere (s); }
void useSymbol (const Symbol& s) override { list.addIfNotAlreadyThere (s); }
private:
Array<Symbol>& list;

View file

@ -167,13 +167,13 @@ public:
ComBaseClassHelperBase (unsigned int initialRefCount) : refCount (initialRefCount) {}
virtual ~ComBaseClassHelperBase() = default;
ULONG STDMETHODCALLTYPE AddRef() { return ++refCount; }
ULONG STDMETHODCALLTYPE Release() { auto r = --refCount; if (r == 0) delete this; return r; }
ULONG STDMETHODCALLTYPE AddRef() override { return ++refCount; }
ULONG STDMETHODCALLTYPE Release() override { auto r = --refCount; if (r == 0) delete this; return r; }
protected:
ULONG refCount;
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{
if (refId == __uuidof (IUnknown))
return castToType<First> (result);
@ -203,7 +203,7 @@ public:
explicit ComBaseClassHelper (unsigned int initialRefCount = 1)
: ComBaseClassHelperBase<ComClasses...> (initialRefCount) {}
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{
const std::tuple<IID, void*> bases[]
{

View file

@ -845,7 +845,7 @@ public:
TheTest::run (*this, random, Tag<int64_t>{});
}
void runTest()
void runTest() override
{
runTestForAllTypes ("InitializationTest", InitializationTest{});

View file

@ -212,11 +212,11 @@ public:
bool loadedOk() const noexcept { return dwFontFace != nullptr; }
BOOL isFontFound() const noexcept { return fontFound; }
float getAscent() const { return ascent; }
float getDescent() const { return 1.0f - ascent; }
float getHeightToPointsFactor() const { return heightToPointsFactor; }
float getAscent() const override { return ascent; }
float getDescent() const override { return 1.0f - ascent; }
float getHeightToPointsFactor() const override { return heightToPointsFactor; }
float getStringWidth (const String& text)
float getStringWidth (const String& text) override
{
auto textUTF32 = text.toUTF32();
auto len = textUTF32.length();
@ -235,7 +235,7 @@ public:
return x * unitsToHeightScaleFactor;
}
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets)
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets) override
{
xOffsets.add (0);
@ -257,7 +257,7 @@ public:
}
}
bool getOutlineForGlyph (int glyphNumber, Path& path)
bool getOutlineForGlyph (int glyphNumber, Path& path) override
{
jassert (path.isEmpty()); // we might need to apply a transform to the path, so this must be empty
auto glyphIndex = (UINT16) glyphNumber;

View file

@ -335,7 +335,7 @@ public:
L' ');
}
bool loadGlyphIfPossible (const juce_wchar character)
bool loadGlyphIfPossible (const juce_wchar character) override
{
if (faceWrapper != nullptr)
{

View file

@ -334,7 +334,7 @@ public:
loadFont();
}
~WindowsTypeface()
~WindowsTypeface() override
{
SelectObject (dc, previousFontH); // Replacing the previous font before deleting the DC avoids a warning in BoundsChecker
DeleteDC (dc);
@ -346,11 +346,11 @@ public:
RemoveFontMemResourceEx (memoryFont);
}
float getAscent() const { return ascent; }
float getDescent() const { return 1.0f - ascent; }
float getHeightToPointsFactor() const { return heightToPointsFactor; }
float getAscent() const override { return ascent; }
float getDescent() const override { return 1.0f - ascent; }
float getHeightToPointsFactor() const override { return heightToPointsFactor; }
float getStringWidth (const String& text)
float getStringWidth (const String& text) override
{
auto utf16 = text.toUTF16();
auto numChars = utf16.length();
@ -367,7 +367,7 @@ public:
return x;
}
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets)
void getGlyphPositions (const String& text, Array<int>& resultGlyphs, Array<float>& xOffsets) override
{
auto utf16 = text.toUTF16();
auto numChars = utf16.length();
@ -391,7 +391,7 @@ public:
xOffsets.add (x);
}
bool getOutlineForGlyph (int glyphNumber, Path& glyphPath)
bool getOutlineForGlyph (int glyphNumber, Path& glyphPath) override
{
if (glyphNumber < 0)
glyphNumber = defaultGlyph;

View file

@ -60,12 +60,12 @@ struct TabbedComponent::ButtonBar final : public TabbedButtonBar
{
}
void currentTabChanged (int newCurrentTabIndex, const String& newTabName)
void currentTabChanged (int newCurrentTabIndex, const String& newTabName) override
{
owner.changeCallback (newCurrentTabIndex, newTabName);
}
void popupMenuClickOnTab (int tabIndex, const String& tabName)
void popupMenuClickOnTab (int tabIndex, const String& tabName) override
{
owner.popupMenuClickOnTab (tabIndex, tabName);
}
@ -75,7 +75,7 @@ struct TabbedComponent::ButtonBar final : public TabbedButtonBar
return owner.tabs->getTabBackgroundColour (tabIndex);
}
TabBarButton* createTabButton (const String& tabName, int tabIndex)
TabBarButton* createTabButton (const String& tabName, int tabIndex) override
{
return owner.createTabButton (tabName, tabIndex);
}

View file

@ -31,7 +31,7 @@ namespace DragAndDropHelpers
//==============================================================================
struct JuceDropSource final : public ComBaseClassHelper<IDropSource>
{
JuceDropSource() {}
JuceDropSource() = default;
JUCE_COMRESULT QueryContinueDrag (BOOL escapePressed, DWORD keys) override
{
@ -123,7 +123,7 @@ namespace DragAndDropHelpers
};
//==============================================================================
class JuceDataObject final : public ComBaseClassHelper <IDataObject>
class JuceDataObject final : public ComBaseClassHelper<IDataObject>
{
public:
JuceDataObject (const FORMATETC* f, const STGMEDIUM* m)
@ -131,12 +131,12 @@ namespace DragAndDropHelpers
{
}
~JuceDataObject()
~JuceDataObject() override
{
jassert (refCount == 0);
}
JUCE_COMRESULT GetData (FORMATETC* pFormatEtc, STGMEDIUM* pMedium)
JUCE_COMRESULT GetData (FORMATETC* pFormatEtc, STGMEDIUM* pMedium) override
{
if ((pFormatEtc->tymed & format->tymed) != 0
&& pFormatEtc->cfFormat == format->cfFormat
@ -164,7 +164,7 @@ namespace DragAndDropHelpers
return DV_E_FORMATETC;
}
JUCE_COMRESULT QueryGetData (FORMATETC* f)
JUCE_COMRESULT QueryGetData (FORMATETC* f) override
{
if (f == nullptr)
return E_INVALIDARG;
@ -177,13 +177,13 @@ namespace DragAndDropHelpers
return DV_E_FORMATETC;
}
JUCE_COMRESULT GetCanonicalFormatEtc (FORMATETC*, FORMATETC* pFormatEtcOut)
JUCE_COMRESULT GetCanonicalFormatEtc (FORMATETC*, FORMATETC* pFormatEtcOut) override
{
pFormatEtcOut->ptd = nullptr;
return E_NOTIMPL;
}
JUCE_COMRESULT EnumFormatEtc (DWORD direction, IEnumFORMATETC** result)
JUCE_COMRESULT EnumFormatEtc (DWORD direction, IEnumFORMATETC** result) override
{
if (result == nullptr)
return E_POINTER;
@ -198,11 +198,11 @@ namespace DragAndDropHelpers
return E_NOTIMPL;
}
JUCE_COMRESULT GetDataHere (FORMATETC*, STGMEDIUM*) { return DATA_E_FORMATETC; }
JUCE_COMRESULT SetData (FORMATETC*, STGMEDIUM*, BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT DAdvise (FORMATETC*, DWORD, IAdviseSink*, DWORD*) { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT DUnadvise (DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT EnumDAdvise (IEnumSTATDATA**) { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT GetDataHere (FORMATETC*, STGMEDIUM*) override { return DATA_E_FORMATETC; }
JUCE_COMRESULT SetData (FORMATETC*, STGMEDIUM*, BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT DAdvise (FORMATETC*, DWORD, IAdviseSink*, DWORD*) override { return OLE_E_ADVISENOTSUPPORTED; }
JUCE_COMRESULT DUnadvise (DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT EnumDAdvise (IEnumSTATDATA**) override { return OLE_E_ADVISENOTSUPPORTED; }
private:
const FORMATETC* const format;

View file

@ -121,7 +121,7 @@ class RelativeRectangleLocalScope final : public Expression::Scope
public:
RelativeRectangleLocalScope (const RelativeRectangle& rect_) : rect (rect_) {}
Expression getSymbolValue (const String& symbol) const
Expression getSymbolValue (const String& symbol) const override
{
switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol))
{

View file

@ -318,7 +318,7 @@ class TableListBox::Header final : public TableHeaderComponent
public:
Header (TableListBox& tlb) : owner (tlb) {}
void addMenuItems (PopupMenu& menu, int columnIdClicked)
void addMenuItems (PopupMenu& menu, int columnIdClicked) override
{
if (owner.isAutoSizeMenuOptionShown())
{
@ -330,7 +330,7 @@ public:
TableHeaderComponent::addMenuItems (menu, columnIdClicked);
}
void reactToMenuItem (int menuReturnId, int columnIdClicked)
void reactToMenuItem (int menuReturnId, int columnIdClicked) override
{
switch (menuReturnId)
{

View file

@ -37,23 +37,23 @@ namespace ActiveXHelpers
//==============================================================================
struct JuceIStorage final : public ComBaseClassHelper<IStorage>
{
JuceIStorage() {}
JuceIStorage() = default;
JUCE_COMRESULT CreateStream (const WCHAR*, DWORD, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT OpenStream (const WCHAR*, void*, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
JUCE_COMRESULT CreateStorage (const WCHAR*, DWORD, DWORD, DWORD, IStorage**) { return E_NOTIMPL; }
JUCE_COMRESULT OpenStorage (const WCHAR*, IStorage*, DWORD, SNB, DWORD, IStorage**) { return E_NOTIMPL; }
JUCE_COMRESULT CopyTo (DWORD, IID const*, SNB, IStorage*) { return E_NOTIMPL; }
JUCE_COMRESULT MoveElementTo (const OLECHAR*,IStorage*, const OLECHAR*, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Commit (DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Revert() { return E_NOTIMPL; }
JUCE_COMRESULT EnumElements (DWORD, void*, DWORD, IEnumSTATSTG**) { return E_NOTIMPL; }
JUCE_COMRESULT DestroyElement (const OLECHAR*) { return E_NOTIMPL; }
JUCE_COMRESULT RenameElement (const WCHAR*, const WCHAR*) { return E_NOTIMPL; }
JUCE_COMRESULT SetElementTimes (const WCHAR*, FILETIME const*, FILETIME const*, FILETIME const*) { return E_NOTIMPL; }
JUCE_COMRESULT SetClass (REFCLSID) { return S_OK; }
JUCE_COMRESULT SetStateBits (DWORD, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT Stat (STATSTG*, DWORD) { return E_NOTIMPL; }
JUCE_COMRESULT CreateStream (const WCHAR*, DWORD, DWORD, DWORD, IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT OpenStream (const WCHAR*, void*, DWORD, DWORD, IStream**) override { return E_NOTIMPL; }
JUCE_COMRESULT CreateStorage (const WCHAR*, DWORD, DWORD, DWORD, IStorage**) override { return E_NOTIMPL; }
JUCE_COMRESULT OpenStorage (const WCHAR*, IStorage*, DWORD, SNB, DWORD, IStorage**) override { return E_NOTIMPL; }
JUCE_COMRESULT CopyTo (DWORD, IID const*, SNB, IStorage*) override { return E_NOTIMPL; }
JUCE_COMRESULT MoveElementTo (const OLECHAR*,IStorage*, const OLECHAR*, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Commit (DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Revert() override { return E_NOTIMPL; }
JUCE_COMRESULT EnumElements (DWORD, void*, DWORD, IEnumSTATSTG**) override { return E_NOTIMPL; }
JUCE_COMRESULT DestroyElement (const OLECHAR*) override { return E_NOTIMPL; }
JUCE_COMRESULT RenameElement (const WCHAR*, const WCHAR*) override { return E_NOTIMPL; }
JUCE_COMRESULT SetElementTimes (const WCHAR*, FILETIME const*, FILETIME const*, FILETIME const*) override { return E_NOTIMPL; }
JUCE_COMRESULT SetClass (REFCLSID) override { return S_OK; }
JUCE_COMRESULT SetStateBits (DWORD, DWORD) override { return E_NOTIMPL; }
JUCE_COMRESULT Stat (STATSTG*, DWORD) override { return E_NOTIMPL; }
};
//==============================================================================
@ -61,18 +61,18 @@ namespace ActiveXHelpers
{
JuceOleInPlaceFrame (HWND hwnd) : window (hwnd) {}
JUCE_COMRESULT GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT GetBorder (LPRECT) { return E_NOTIMPL; }
JUCE_COMRESULT RequestBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetActiveObject (IOleInPlaceActiveObject* a, LPCOLESTR) { activeObject = a; return S_OK; }
JUCE_COMRESULT InsertMenus (HMENU, LPOLEMENUGROUPWIDTHS) { return E_NOTIMPL; }
JUCE_COMRESULT SetMenu (HMENU, HOLEMENU, HWND) { return S_OK; }
JUCE_COMRESULT RemoveMenus (HMENU) { return E_NOTIMPL; }
JUCE_COMRESULT SetStatusText (LPCOLESTR) { return S_OK; }
JUCE_COMRESULT EnableModeless (BOOL) { return S_OK; }
JUCE_COMRESULT TranslateAccelerator (LPMSG, WORD) { return E_NOTIMPL; }
JUCE_COMRESULT GetWindow (HWND* lphwnd) override { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT GetBorder (LPRECT) override { return E_NOTIMPL; }
JUCE_COMRESULT RequestBorderSpace (LPCBORDERWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetBorderSpace (LPCBORDERWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetActiveObject (IOleInPlaceActiveObject* a, LPCOLESTR) override { activeObject = a; return S_OK; }
JUCE_COMRESULT InsertMenus (HMENU, LPOLEMENUGROUPWIDTHS) override { return E_NOTIMPL; }
JUCE_COMRESULT SetMenu (HMENU, HOLEMENU, HWND) override { return S_OK; }
JUCE_COMRESULT RemoveMenus (HMENU) override { return E_NOTIMPL; }
JUCE_COMRESULT SetStatusText (LPCOLESTR) override { return S_OK; }
JUCE_COMRESULT EnableModeless (BOOL) override { return S_OK; }
JUCE_COMRESULT TranslateAccelerator (LPMSG, WORD) override { return E_NOTIMPL; }
HRESULT OfferKeyTranslation (LPMSG lpmsg)
{
@ -94,18 +94,18 @@ namespace ActiveXHelpers
frame (new JuceOleInPlaceFrame (window))
{}
~JuceIOleInPlaceSite()
~JuceIOleInPlaceSite() override
{
frame->Release();
}
JUCE_COMRESULT GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT CanInPlaceActivate() { return S_OK; }
JUCE_COMRESULT OnInPlaceActivate() { return S_OK; }
JUCE_COMRESULT OnUIActivate() { return S_OK; }
JUCE_COMRESULT GetWindow (HWND* lphwnd) override { *lphwnd = window; return S_OK; }
JUCE_COMRESULT ContextSensitiveHelp (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT CanInPlaceActivate() override { return S_OK; }
JUCE_COMRESULT OnInPlaceActivate() override { return S_OK; }
JUCE_COMRESULT OnUIActivate() override { return S_OK; }
JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo)
JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo) override
{
/* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks..
If you don't call AddRef then others crash (e.g. QuickTime).. Bit of a catch-22, so letting it leak is probably preferable.
@ -119,12 +119,12 @@ namespace ActiveXHelpers
return S_OK;
}
JUCE_COMRESULT Scroll (SIZE) { return E_NOTIMPL; }
JUCE_COMRESULT OnUIDeactivate (BOOL) { return S_OK; }
JUCE_COMRESULT OnInPlaceDeactivate() { return S_OK; }
JUCE_COMRESULT DiscardUndoState() { return E_NOTIMPL; }
JUCE_COMRESULT DeactivateAndUndo() { return E_NOTIMPL; }
JUCE_COMRESULT OnPosRectChange (LPCRECT) { return S_OK; }
JUCE_COMRESULT Scroll (SIZE) override { return E_NOTIMPL; }
JUCE_COMRESULT OnUIDeactivate (BOOL) override { return S_OK; }
JUCE_COMRESULT OnInPlaceDeactivate() override { return S_OK; }
JUCE_COMRESULT DiscardUndoState() override { return E_NOTIMPL; }
JUCE_COMRESULT DeactivateAndUndo() override { return E_NOTIMPL; }
JUCE_COMRESULT OnPosRectChange (LPCRECT) override { return S_OK; }
LRESULT offerEventToActiveXControl (::MSG& msg)
{
@ -144,7 +144,7 @@ namespace ActiveXHelpers
JuceIOleClientSite (HWND window) : inplaceSite (new JuceIOleInPlaceSite (window))
{}
~JuceIOleClientSite()
~JuceIOleClientSite() override
{
inplaceSite->Release();
@ -155,7 +155,7 @@ namespace ActiveXHelpers
}
}
JUCE_COMRESULT QueryInterface (REFIID type, void** result)
JUCE_COMRESULT QueryInterface (REFIID type, void** result) override
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
@ -177,12 +177,12 @@ namespace ActiveXHelpers
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
}
JUCE_COMRESULT SaveObject() { return E_NOTIMPL; }
JUCE_COMRESULT GetMoniker (DWORD, DWORD, IMoniker**) { return E_NOTIMPL; }
JUCE_COMRESULT GetContainer (LPOLECONTAINER* ppContainer) { *ppContainer = nullptr; return E_NOINTERFACE; }
JUCE_COMRESULT ShowObject() { return S_OK; }
JUCE_COMRESULT OnShowWindow (BOOL) { return E_NOTIMPL; }
JUCE_COMRESULT RequestNewObjectLayout() { return E_NOTIMPL; }
JUCE_COMRESULT SaveObject() override { return E_NOTIMPL; }
JUCE_COMRESULT GetMoniker (DWORD, DWORD, IMoniker**) override { return E_NOTIMPL; }
JUCE_COMRESULT GetContainer (LPOLECONTAINER* ppContainer) override { *ppContainer = nullptr; return E_NOINTERFACE; }
JUCE_COMRESULT ShowObject() override { return S_OK; }
JUCE_COMRESULT OnShowWindow (BOOL) override { return E_NOTIMPL; }
JUCE_COMRESULT RequestNewObjectLayout() override { return E_NOTIMPL; }
LRESULT offerEventToActiveXControl (::MSG& msg)
{

View file

@ -670,7 +670,7 @@ public:
: originalWorker (std::move (workerToUse))
{}
void operator() (OpenGLContext& calleeContext)
void operator() (OpenGLContext& calleeContext) override
{
if (originalWorker != nullptr)
(*originalWorker) (calleeContext);

View file

@ -406,7 +406,7 @@ public:
: UnitTest ("OSCAddress class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("construction and parsing");
{
@ -452,7 +452,7 @@ public:
: UnitTest ("OSCAddressPattern class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("construction and parsing");
{
@ -593,7 +593,7 @@ public:
: UnitTest ("OSCAddress class / pattern matching", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("basic string matching");
{

View file

@ -102,7 +102,7 @@ public:
return block;
}
void runTest()
void runTest() override
{
runTestInitialisation();
}

View file

@ -119,7 +119,7 @@ public:
: UnitTest ("OSCBundle class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("Construction");
{
@ -224,7 +224,7 @@ public:
: UnitTest ("OSCBundle::Element class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("Construction from OSCMessage");
{

View file

@ -107,7 +107,7 @@ public:
: UnitTest ("OSCMessage class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("Basic usage");
{

View file

@ -670,7 +670,7 @@ public:
: UnitTest ("OSCInputStream class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("reading OSC addresses");
{

View file

@ -343,7 +343,7 @@ public:
: UnitTest ("OSCBinaryWriter class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("writing OSC addresses");
{
@ -672,7 +672,7 @@ public:
: UnitTest ("OSCRoundTripTests class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("Empty OSC message");
{

View file

@ -83,7 +83,7 @@ public:
: UnitTest ("OSCTimeTag class", UnitTestCategories::osc)
{}
void runTest()
void runTest() override
{
beginTest ("Basics");

View file

@ -530,7 +530,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
GrabberCallback (Pimpl& p)
: ComBaseClassHelperBase (0), owner (p) {}
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
JUCE_COMRESULT QueryInterface (REFIID refId, void** result) override
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wlanguage-extension-token")
if (refId == __uuidof (ComTypes::ISampleGrabberCB))
@ -540,9 +540,9 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster
return ComBaseClassHelperBase<ComTypes::ISampleGrabberCB>::QueryInterface (refId, result);
}
JUCE_COMRESULT SampleCB (double, ComTypes::IMediaSample*) { return E_FAIL; }
JUCE_COMRESULT SampleCB (double, ComTypes::IMediaSample*) override { return E_FAIL; }
JUCE_COMRESULT BufferCB (double time, BYTE* buffer, long bufferSize)
JUCE_COMRESULT BufferCB (double time, BYTE* buffer, long bufferSize) override
{
owner.handleFrame (time, buffer, bufferSize);
return S_OK;