1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 06:22:58 +02:00

Replace virtual with override wherever possible; eliminate needless virtual...

... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
This commit is contained in:
Paul Licameli
2016-02-24 01:06:47 -05:00
parent 74121c1494
commit 990080ae7d
169 changed files with 1652 additions and 1639 deletions

View File

@@ -76,9 +76,9 @@ class DecoratedCommand /* not final */ : public Command
protected:
Command *mCommand;
public:
virtual void Progress(double completed);
virtual void Status(const wxString &message) override;
virtual void Error(const wxString &message) override;
void Progress(double completed) override;
void Status(const wxString &message) override;
void Error(const wxString &message) override;
DecoratedCommand(Command *cmd)
: mCommand(cmd)
@@ -86,10 +86,9 @@ public:
wxASSERT(cmd != NULL);
}
virtual ~DecoratedCommand();
virtual wxString GetName();
virtual CommandSignature &GetSignature();
virtual bool SetParameter(const wxString &paramName, const wxVariant &paramValue);
virtual bool Apply(CommandExecutionContext context) = 0;
wxString GetName() override;
CommandSignature &GetSignature() override;
bool SetParameter(const wxString &paramName, const wxVariant &paramValue) override;
};
// Decorator command that performs the given command and then outputs a status
@@ -101,7 +100,7 @@ public:
: DecoratedCommand(cmd)
{ }
virtual bool Apply(CommandExecutionContext context);
bool Apply(CommandExecutionContext context) override;
};
class CommandImplementation /* not final */ : public Command
@@ -155,7 +154,7 @@ public:
/// Actually carry out the command. Return true if successful and false
/// otherwise.
virtual bool Apply(CommandExecutionContext context);
bool Apply(CommandExecutionContext context) override;
};
#endif /* End of include guard: __COMMAND__ */