mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-30 15:58:24 +01:00
trivial: Mark overrides as such.
This trivial change adds the "override" keyword to some methods of subclasses meant to override interface methods. This ensures that any future change to the interface' method signatures which are not correctly mirrored in the subclass will break at compile time with a clear error message, rather than fail at runtime (which is harder to debug).
This commit is contained in:
@@ -111,9 +111,9 @@ public:
|
||||
class ConsolePrinter : public Printer
|
||||
{
|
||||
public:
|
||||
void header();
|
||||
void result(const State& state);
|
||||
void footer();
|
||||
void header() override;
|
||||
void result(const State& state) override;
|
||||
void footer() override;
|
||||
};
|
||||
|
||||
// creates box plot with plotly.js
|
||||
@@ -121,9 +121,9 @@ class PlotlyPrinter : public Printer
|
||||
{
|
||||
public:
|
||||
PlotlyPrinter(std::string plotly_url, int64_t width, int64_t height);
|
||||
void header();
|
||||
void result(const State& state);
|
||||
void footer();
|
||||
void header() override;
|
||||
void result(const State& state) override;
|
||||
void footer() override;
|
||||
|
||||
private:
|
||||
std::string m_plotly_url;
|
||||
|
||||
Reference in New Issue
Block a user