Codechange: Use override specifier in Window-derived classes.

This commit is contained in:
peter1138
2019-03-04 07:49:37 +00:00
committed by Michael Lutz
parent aafce47596
commit 317f69c152
54 changed files with 765 additions and 765 deletions

View File

@@ -80,7 +80,7 @@ public:
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
}
virtual void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
switch (widget) {
case WID_EV_CAPTION:
@@ -90,7 +90,7 @@ public:
}
}
virtual void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_EV_ZOOM_IN: DoZoomInOutWindow(ZOOM_IN, this); break;
@@ -120,7 +120,7 @@ public:
}
}
virtual void OnResize()
void OnResize() override
{
if (this->viewport != NULL) {
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_EV_VIEWPORT);
@@ -128,7 +128,7 @@ public:
}
}
virtual void OnScroll(Point delta)
void OnScroll(Point delta) override
{
this->viewport->scrollpos_x += ScaleByZoom(delta.x, this->viewport->zoom);
this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom);
@@ -136,7 +136,7 @@ public:
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
}
virtual void OnMouseWheel(int wheel)
void OnMouseWheel(int wheel) override
{
if (_settings_client.gui.scrollwheel_scrolling != 2) {
ZoomInOrOutToCursorWindow(wheel < 0, this);
@@ -148,7 +148,7 @@ public:
* @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;
/* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */