Codechange: Use override specifer for overriding member declarations

This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
This commit is contained in:
Henry Wilson
2019-03-03 22:25:13 +00:00
committed by Michael Lutz
parent 31260e6625
commit af7d9020a1
85 changed files with 565 additions and 565 deletions

View File

@@ -50,7 +50,7 @@ struct GoalListWindow : public Window {
this->OnInvalidateData(0);
}
/* virtual */ void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
if (widget != WID_GOAL_CAPTION) return;
@@ -62,7 +62,7 @@ struct GoalListWindow : public Window {
}
}
/* virtual */ void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
if (widget != WID_GOAL_LIST) return;
@@ -177,7 +177,7 @@ struct GoalListWindow : public Window {
return 3 + num_global + num_company;
}
/* 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_GOAL_LIST) return;
Dimension d = maxdim(GetStringBoundingBox(STR_GOALS_GLOBAL_TITLE), GetStringBoundingBox(STR_GOALS_COMPANY_TITLE));
@@ -272,7 +272,7 @@ struct GoalListWindow : public Window {
DrawPartialGoalList(pos, cap, x, y, right, progress_col_width, false, column);
}
/* virtual */ void OnPaint()
void OnPaint() override
{
this->DrawWidgets();
@@ -299,7 +299,7 @@ struct GoalListWindow : public Window {
}
/* virtual */ void OnResize()
void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_GOAL_LIST);
}
@@ -309,7 +309,7 @@ struct GoalListWindow : 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->vscroll->SetCount(this->CountLines());
@@ -388,7 +388,7 @@ struct GoalQuestionWindow : public Window {
free(this->question);
}
/* virtual */ void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
switch (widget) {
case WID_GQ_CAPTION:
@@ -409,7 +409,7 @@ struct GoalQuestionWindow : public Window {
}
}
/* virtual */ void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_GQ_BUTTON_1:
@@ -429,7 +429,7 @@ struct GoalQuestionWindow : 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
{
if (widget != WID_GQ_QUESTION) return;
@@ -437,7 +437,7 @@ struct GoalQuestionWindow : public Window {
size->height = GetStringHeight(STR_JUST_RAW_STRING, size->width) + WD_PAR_VSEP_WIDE;
}
/* virtual */ void DrawWidget(const Rect &r, int widget) const
void DrawWidget(const Rect &r, int widget) const override
{
if (widget != WID_GQ_QUESTION) return;