Fix missing override keywords
This commit is contained in:
		| @@ -72,7 +72,7 @@ public: | ||||
| 	~SpriteFontCache(); | ||||
| 	virtual SpriteID GetUnicodeGlyph(WChar key); | ||||
| 	virtual void SetUnicodeGlyph(WChar key, SpriteID sprite); | ||||
| 	virtual void InitializeUnicodeGlyphMap(); | ||||
| 	virtual void InitializeUnicodeGlyphMap() override; | ||||
| 	virtual void ClearFontCache(); | ||||
| 	virtual const Sprite *GetGlyph(GlyphID key); | ||||
| 	virtual uint GetGlyphWidth(GlyphID key); | ||||
|   | ||||
| @@ -66,7 +66,7 @@ public: | ||||
| 	SpriteID GetUnicodeGlyph(WChar key) override { return this->parent->GetUnicodeGlyph(key); } | ||||
| 	void SetUnicodeGlyph(WChar key, SpriteID sprite) override { this->parent->SetUnicodeGlyph(key, sprite); } | ||||
|  | ||||
| 	virtual void InitializeUnicodeGlyphMap() | ||||
| 	virtual void InitializeUnicodeGlyphMap() override | ||||
| 	{ | ||||
| 		this->parent->InitializeUnicodeGlyphMap(); | ||||
| 		font_height_cache[this->fs] = this->GetHeight(); | ||||
|   | ||||
| @@ -107,7 +107,7 @@ struct PlansWindow : Window { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnClick(Point pt, int widget, int click_count) | ||||
| 	virtual void OnClick(Point pt, int widget, int click_count) override | ||||
| 	{ | ||||
| 		switch (widget) { | ||||
| 			case WID_PLN_NEW: | ||||
| @@ -232,7 +232,7 @@ struct PlansWindow : Window { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnQueryTextFinished(char *str) | ||||
| 	virtual void OnQueryTextFinished(char *str) override | ||||
| 	{ | ||||
| 		if (_current_plan == nullptr || str == nullptr) return; | ||||
|  | ||||
| @@ -247,7 +247,7 @@ struct PlansWindow : Window { | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnPaint() | ||||
| 	virtual void OnPaint() override | ||||
| 	{ | ||||
| 		this->SetWidgetDisabledState(WID_PLN_HIDE_ALL, this->vscroll->GetCount() == 0); | ||||
| 		this->SetWidgetDisabledState(WID_PLN_SHOW_ALL, this->vscroll->GetCount() == 0); | ||||
| @@ -261,7 +261,7 @@ struct PlansWindow : Window { | ||||
| 		this->DrawWidgets(); | ||||
| 	} | ||||
|  | ||||
| 	virtual void DrawWidget(const Rect &r, int widget) const | ||||
| 	virtual void DrawWidget(const Rect &r, int widget) const override | ||||
| 	{ | ||||
| 		switch (widget) { | ||||
| 			case WID_PLN_LIST: { | ||||
| @@ -323,12 +323,12 @@ struct PlansWindow : Window { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnResize() | ||||
| 	virtual void OnResize() override | ||||
| 	{ | ||||
| 		this->vscroll->SetCapacityFromWidget(this, WID_PLN_LIST, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM); | ||||
| 	} | ||||
|  | ||||
| 	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) | ||||
| 	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override | ||||
| 	{ | ||||
| 		switch (widget) { | ||||
| 			case WID_PLN_LIST: | ||||
| @@ -369,14 +369,14 @@ struct PlansWindow : Window { | ||||
| 	} | ||||
|  | ||||
| 	/** The drawing of a line starts. */ | ||||
| 	virtual void OnPlaceObject(Point pt, TileIndex tile) | ||||
| 	virtual void OnPlaceObject(Point pt, TileIndex tile) override | ||||
| 	{ | ||||
| 		/* A player can't add lines to a public plan of another company. */ | ||||
| 		if (_current_plan && _current_plan->owner == _local_company) VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_DRAW_PLANLINE); | ||||
| 	} | ||||
|  | ||||
| 	/** The drawing of a line is in progress. */ | ||||
| 	virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) | ||||
| 	virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override | ||||
| 	{ | ||||
| 		const Point p = GetTileBelowCursor(); | ||||
| 		const TileIndex tile = TileVirtXY(p.x, p.y); | ||||
| @@ -387,13 +387,13 @@ struct PlansWindow : Window { | ||||
| 	} | ||||
|  | ||||
| 	/** The drawing of a line ends up normally. */ | ||||
| 	virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) | ||||
| 	virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override | ||||
| 	{ | ||||
| 		if (_current_plan) _current_plan->ValidateNewLine(); | ||||
| 	} | ||||
|  | ||||
| 	/** The drawing of a line is aborted. */ | ||||
| 	virtual void OnPlaceObjectAbort() | ||||
| 	virtual void OnPlaceObjectAbort() override | ||||
| 	{ | ||||
| 		if (_current_plan) { | ||||
| 			_current_plan->temp_line->MarkDirty(); | ||||
|   | ||||
| @@ -947,7 +947,7 @@ class NIHTown : public NIHelper { | ||||
| 		return nullptr; | ||||
| 	} | ||||
|  | ||||
| 	virtual std::vector<uint32> GetPSAGRFIDs(uint index) const | ||||
| 	virtual std::vector<uint32> GetPSAGRFIDs(uint index) const override | ||||
| 	{ | ||||
| 		Town *t = Town::Get(index); | ||||
|  | ||||
|   | ||||
| @@ -191,7 +191,7 @@ public: | ||||
| 		UpdateButtonState(); | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnResize() | ||||
| 	virtual void OnResize() override | ||||
| 	{ | ||||
| 		NWidgetCore *template_panel = this->GetWidget<NWidgetCore>(TCW_NEW_TMPL_PANEL); | ||||
| 		this->hscroll->SetCapacity(template_panel->current_x); | ||||
| @@ -201,7 +201,7 @@ public: | ||||
| 	} | ||||
|  | ||||
|  | ||||
| 	virtual void OnInvalidateData(int data = 0, bool gui_scope = true) | ||||
| 	virtual void OnInvalidateData(int data = 0, bool gui_scope = true) override | ||||
| 	{ | ||||
| 		if(!gui_scope) return; | ||||
|  | ||||
| @@ -215,7 +215,7 @@ public: | ||||
| 		UpdateButtonState(); | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnClick(Point pt, int widget, int click_count) | ||||
| 	virtual void OnClick(Point pt, int widget, int click_count) override | ||||
| 	{ | ||||
| 		switch(widget) { | ||||
| 			case TCW_NEW_TMPL_PANEL: { | ||||
| @@ -259,7 +259,7 @@ public: | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	virtual bool OnVehicleSelect(const Vehicle *v) | ||||
| 	virtual bool OnVehicleSelect(const Vehicle *v) override | ||||
| 	{ | ||||
| 		// throw away the current virtual train | ||||
| 		if (virtual_train != nullptr) { | ||||
| @@ -276,7 +276,7 @@ public: | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnPlaceObjectAbort() | ||||
| 	virtual void OnPlaceObjectAbort() override | ||||
| 	{ | ||||
| 		this->sel = INVALID_VEHICLE; | ||||
| 		this->vehicle_over = INVALID_VEHICLE; | ||||
| @@ -284,7 +284,7 @@ public: | ||||
| 		this->SetDirty(); | ||||
| 	} | ||||
|  | ||||
| 	virtual void DrawWidget(const Rect &r, int widget) const | ||||
| 	virtual void DrawWidget(const Rect &r, int widget) const override | ||||
| 	{ | ||||
| 		switch(widget) { | ||||
| 			case TCW_NEW_TMPL_PANEL: { | ||||
| @@ -364,7 +364,7 @@ public: | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnDragDrop(Point pt, int widget) | ||||
| 	virtual void OnDragDrop(Point pt, int widget) override | ||||
| 	{ | ||||
| 		switch (widget) { | ||||
| 			case TCW_NEW_TMPL_PANEL: { | ||||
| @@ -425,7 +425,7 @@ public: | ||||
| 		this->SetDirty(); | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnMouseDrag(Point pt, int widget) | ||||
| 	virtual void OnMouseDrag(Point pt, int widget) override | ||||
| 	{ | ||||
| 		if (this->sel == INVALID_VEHICLE) return; | ||||
|  | ||||
| @@ -470,7 +470,7 @@ public: | ||||
| 		this->SetWidgetDirty(widget); | ||||
| 	} | ||||
|  | ||||
| 	virtual void OnPaint() | ||||
| 	virtual void OnPaint() override | ||||
| 	{ | ||||
| 		uint min_width = 32; | ||||
| 		uint min_height = 30; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonathan G Rennison
					Jonathan G Rennison