diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -38,7 +38,7 @@ struct SubsidyListWindow : Window { this->OnInvalidateData(0); } - virtual void OnClick(Point pt, int widget, int click_count) + void OnClick(Point pt, int widget, int click_count) override { if (widget != WID_SUL_PANEL) return; @@ -129,7 +129,7 @@ struct SubsidyListWindow : Window { return 3 + num_awarded + num_not_awarded; } - 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 { if (widget != WID_SUL_PANEL) return; Dimension d = maxdim(GetStringBoundingBox(STR_SUBSIDIES_OFFERED_TITLE), GetStringBoundingBox(STR_SUBSIDIES_SUBSIDISED_TITLE)); @@ -142,7 +142,7 @@ struct SubsidyListWindow : Window { *size = maxdim(*size, d); } - virtual void DrawWidget(const Rect &r, int widget) const + void DrawWidget(const Rect &r, int widget) const override { if (widget != WID_SUL_PANEL) return; @@ -207,7 +207,7 @@ struct SubsidyListWindow : Window { } } - virtual void OnResize() + void OnResize() override { this->vscroll->SetCapacityFromWidget(this, WID_SUL_PANEL); } @@ -217,7 +217,7 @@ struct SubsidyListWindow : 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->vscroll->SetCount(this->CountLines());