Codechange: Use override specifier in Window-derived classes.
This commit is contained in:
@@ -113,7 +113,7 @@ struct BuildDocksToolbarWindow : 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;
|
||||
|
||||
@@ -129,7 +129,7 @@ struct BuildDocksToolbarWindow : 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_DT_CANAL: // Build canal button
|
||||
@@ -173,7 +173,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
this->last_clicked_widget = (DockToolbarWidgets)widget;
|
||||
}
|
||||
|
||||
virtual void OnPlaceObject(Point pt, TileIndex tile)
|
||||
void OnPlaceObject(Point pt, TileIndex tile) override
|
||||
{
|
||||
switch (this->last_clicked_widget) {
|
||||
case WID_DT_CANAL: // Build canal button
|
||||
@@ -222,12 +222,12 @@ struct BuildDocksToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
|
||||
void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
|
||||
{
|
||||
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
|
||||
}
|
||||
|
||||
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
|
||||
void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
|
||||
{
|
||||
if (pt.x != -1) {
|
||||
switch (select_proc) {
|
||||
@@ -246,7 +246,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPlaceObjectAbort()
|
||||
void OnPlaceObjectAbort() override
|
||||
{
|
||||
this->RaiseButtons();
|
||||
|
||||
@@ -256,7 +256,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
virtual void OnPlacePresize(Point pt, TileIndex tile_from)
|
||||
void OnPlacePresize(Point pt, TileIndex tile_from) override
|
||||
{
|
||||
TileIndex tile_to = tile_from;
|
||||
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
void OnPaint() override
|
||||
{
|
||||
int rad = (_settings_game.station.modified_catchment) ? CA_DOCK : CA_UNMODIFIED;
|
||||
|
||||
@@ -437,7 +437,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 BDSW_LT_OFF:
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnRealtimeTick(uint delta_ms)
|
||||
void OnRealtimeTick(uint delta_ms) override
|
||||
{
|
||||
CheckRedrawStationCoverage(this);
|
||||
}
|
||||
@@ -505,7 +505,7 @@ public:
|
||||
UpdateDocksDirection();
|
||||
}
|
||||
|
||||
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_BDD_X:
|
||||
@@ -516,7 +516,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
void OnPaint() override
|
||||
{
|
||||
this->DrawWidgets();
|
||||
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
DrawShipDepotSprite(this->GetWidget<NWidgetBase>(WID_BDD_Y)->pos_x + x1, this->GetWidget<NWidgetBase>(WID_BDD_Y)->pos_y + y2, AXIS_Y, DEPOT_PART_SOUTH);
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BDD_X:
|
||||
|
Reference in New Issue
Block a user