diff options
author | peter1138 <peter1138@openttd.org> | 2019-03-04 07:49:37 +0000 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-03-24 16:10:04 +0100 |
commit | 317f69c1520a3e60335c56d358686609d3decf86 (patch) | |
tree | a3432e9e5f433043f3e5431892f49580f1965c73 /src/timetable_gui.cpp | |
parent | aafce475963e2d2df59de9b02242a04856e78f93 (diff) | |
download | openttd-317f69c1520a3e60335c56d358686609d3decf86.tar.xz |
Codechange: Use override specifier in Window-derived classes.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 5dd45561f..8280c0e89 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -189,7 +189,7 @@ struct TimetableWindow : Window { return (travelling && v->lateness_counter < 0); } - 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 { switch (widget) { case WID_VT_ARRIVAL_DEPARTURE_PANEL: @@ -227,7 +227,7 @@ struct TimetableWindow : 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 { switch (data) { case VIWD_AUTOREPLACE: @@ -297,7 +297,7 @@ struct TimetableWindow : Window { } - virtual void OnPaint() + void OnPaint() override { const Vehicle *v = this->vehicle; int selected = this->sel_index; @@ -341,7 +341,7 @@ struct TimetableWindow : Window { this->DrawWidgets(); } - virtual void SetStringParameters(int widget) const + void SetStringParameters(int widget) const override { switch (widget) { case WID_VT_CAPTION: SetDParam(0, this->vehicle->index); break; @@ -349,7 +349,7 @@ struct TimetableWindow : Window { } } - virtual void DrawWidget(const Rect &r, int widget) const + void DrawWidget(const Rect &r, int widget) const override { const Vehicle *v = this->vehicle; int selected = this->sel_index; @@ -513,7 +513,7 @@ struct TimetableWindow : Window { return v->index | (order_number << 20) | (mtf << 28); } - virtual void OnClick(Point pt, int widget, int click_count) + void OnClick(Point pt, int widget, int click_count) override { const Vehicle *v = this->vehicle; @@ -614,7 +614,7 @@ struct TimetableWindow : Window { this->SetDirty(); } - virtual void OnQueryTextFinished(char *str) + void OnQueryTextFinished(char *str) override { if (str == NULL) return; @@ -634,7 +634,7 @@ struct TimetableWindow : Window { DoCommandP(0, p1, p2, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE)); } - virtual void OnResize() + void OnResize() override { /* Update the scroll bar */ this->vscroll->SetCapacityFromWidget(this, WID_VT_TIMETABLE_PANEL, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM); |