From 09b2736103e48b58ed2e996ed03796b1288c355e Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 17 Jul 2015 14:56:22 -0700 Subject: [PATCH] Mark a bunch of things as overriding virtual functions --- libaegisub/osx/dispatch.mm | 2 +- src/command/command.h | 14 +++++++------- src/grid_column.cpp | 2 +- src/visual_tool.h | 3 --- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/libaegisub/osx/dispatch.mm b/libaegisub/osx/dispatch.mm index 8dc2f6680..afb3c3131 100644 --- a/libaegisub/osx/dispatch.mm +++ b/libaegisub/osx/dispatch.mm @@ -30,7 +30,7 @@ struct OSXQueue : Queue { struct MainQueue final : OSXQueue { void DoInvoke(Thunk thunk) override { invoke_main(thunk); } - void DoSync(Thunk thunk) { + void DoSync(Thunk thunk) override { std::mutex m; std::condition_variable cv; std::unique_lock l(m); diff --git a/src/command/command.h b/src/command/command.h index f8ad391e1..38ea38f8a 100644 --- a/src/command/command.h +++ b/src/command/command.h @@ -28,11 +28,11 @@ namespace agi { struct Context; } -#define CMD_NAME(a) const char* name() const { return a; } -#define STR_MENU(a) wxString StrMenu(const agi::Context *) const { return _(a); } -#define STR_DISP(a) wxString StrDisplay(const agi::Context *) const { return _(a); } -#define STR_HELP(a) wxString StrHelp() const { return _(a); } -#define CMD_TYPE(a) int Type() const { using namespace cmd; return a; } +#define CMD_NAME(a) const char* name() const override { return a; } +#define STR_MENU(a) wxString StrMenu(const agi::Context *) const override { return _(a); } +#define STR_DISP(a) wxString StrDisplay(const agi::Context *) const override { return _(a); } +#define STR_HELP(a) wxString StrHelp() const override { return _(a); } +#define CMD_TYPE(a) int Type() const override { using namespace cmd; return a; } #define CMD_ICON(icon) wxBitmap Icon(int size, wxLayoutDirection dir = wxLayout_LeftToRight) const override { \ if (size == 64) return GETIMAGEDIR(icon##_64, dir); \ @@ -43,12 +43,12 @@ namespace agi { struct Context; } } #define COMMAND_GROUP(cname, cmdname, menu, disp, help) \ -struct cname final : public Command { \ +struct cname final : public Command { \ CMD_NAME(cmdname) \ STR_MENU(menu) \ STR_DISP(disp) \ STR_HELP(help) \ - void operator()(agi::Context *) { } \ + void operator()(agi::Context *) override { } \ } /// Commands diff --git a/src/grid_column.cpp b/src/grid_column.cpp index 289ea79b3..321a09439 100644 --- a/src/grid_column.cpp +++ b/src/grid_column.cpp @@ -320,7 +320,7 @@ public: return helper(wxS("999")); } - void Paint(wxDC &dc, int x, int y, const AssDialogue *d, const agi::Context *) const { + void Paint(wxDC &dc, int x, int y, const AssDialogue *d, const agi::Context *) const override { int cps = CPS(d); if (cps < 0 || cps > 100) return; diff --git a/src/visual_tool.h b/src/visual_tool.h index c041b5909..d1af51f02 100644 --- a/src/visual_tool.h +++ b/src/visual_tool.h @@ -168,9 +168,6 @@ private: /// @param feature The current feature to process; not necessarily the one clicked on virtual void UpdateDrag(FeatureType *feature) { } - /// @brief Draw stuff - virtual void Draw()=0; - protected: std::set sel_features; ///< Currently selected visual features