From 317f69c1520a3e60335c56d358686609d3decf86 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 4 Mar 2019 07:49:37 +0000 Subject: Codechange: Use override specifier in Window-derived classes. --- src/intro_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/intro_gui.cpp') diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 001afde1d..307be4405 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -49,7 +49,7 @@ struct SelectGameWindow : public Window { * @param data Information about the changed data. * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. */ - virtual void OnInvalidateData(int data = 0, bool gui_scope = true) + void OnInvalidateData(int data = 0, bool gui_scope = true) override { if (!gui_scope) return; this->SetWidgetLoweredState(WID_SGI_TEMPERATE_LANDSCAPE, _settings_newgame.game_creation.landscape == LT_TEMPERATE); @@ -58,7 +58,7 @@ struct SelectGameWindow : public Window { this->SetWidgetLoweredState(WID_SGI_TOYLAND_LANDSCAPE, _settings_newgame.game_creation.landscape == LT_TOYLAND); } - virtual void OnInit() + void OnInit() override { bool missing_sprites = _missing_extra_graphics > 0 && !IsReleasedVersion(); this->GetWidget(WID_SGI_BASESET_SELECTION)->SetDisplayedPlane(missing_sprites ? 0 : SZSP_NONE); @@ -67,7 +67,7 @@ struct SelectGameWindow : public Window { this->GetWidget(WID_SGI_TRANSLATION_SELECTION)->SetDisplayedPlane(missing_lang ? 0 : SZSP_NONE); } - virtual void DrawWidget(const Rect &r, int widget) const + void DrawWidget(const Rect &r, int widget) const override { switch (widget) { case WID_SGI_BASESET: @@ -82,7 +82,7 @@ struct SelectGameWindow : public Window { } } - virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) + void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override { StringID str = 0; switch (widget) { @@ -111,7 +111,7 @@ struct SelectGameWindow : public Window { } } - virtual void OnClick(Point pt, int widget, int click_count) + void OnClick(Point pt, int widget, int click_count) override { /* Do not create a network server when you (just) have closed one of the game * creation/load windows for the network server. */ -- cgit v1.2.3-54-g00ecf