Codechange: Use override specifier in Window-derived classes.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user