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

@@ -320,7 +320,7 @@ struct NetworkChatWindow : public Window {
InvalidateWindowData(WC_NEWS_WINDOW, 0, 0);
}
virtual void FindWindowPlacementAndResize(int def_width, int def_height)
void FindWindowPlacementAndResize(int def_width, int def_height) override
{
Window::FindWindowPlacementAndResize(_toolbar_width, def_height);
}
@@ -458,13 +458,13 @@ struct NetworkChatWindow : public Window {
free(pre_buf);
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) override
{
Point pt = { 0, _screen.height - sm_height - FindWindowById(WC_STATUS_BAR, 0)->height };
return pt;
}
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_NC_DESTINATION) return;
@@ -477,7 +477,7 @@ struct NetworkChatWindow : public 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_NC_DESTINATION) return;
@@ -487,7 +487,7 @@ struct NetworkChatWindow : public Window {
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, this->dest_string, TC_BLACK, SA_RIGHT);
}
virtual void OnClick(Point pt, int widget, int click_count)
void OnClick(Point pt, int widget, int click_count) override
{
switch (widget) {
case WID_NC_SENDBUTTON: /* Send */
@@ -500,7 +500,7 @@ struct NetworkChatWindow : public Window {
}
}
virtual EventState OnKeyPress(WChar key, uint16 keycode)
EventState OnKeyPress(WChar key, uint16 keycode) override
{
EventState state = ES_NOT_HANDLED;
if (keycode == WKC_TAB) {
@@ -510,7 +510,7 @@ struct NetworkChatWindow : public Window {
return state;
}
virtual void OnEditboxChanged(int wid)
void OnEditboxChanged(int wid) override
{
_chat_tab_completion_active = false;
}
@@ -520,7 +520,7 @@ struct NetworkChatWindow : 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 (data == this->dest) delete this;
}