Changeset - r23505:2c24909d1448
[Not reviewed]
master
0 2 0
peter1138 - 6 years ago 2019-03-24 16:23:46
peter1138@openttd.org
Codechange: More use of override keyword.
2 files changed with 18 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/newgrf_commons.h
Show inline comments
 
@@ -225,24 +225,26 @@ public:
 

	
 
struct HouseSpec;
 
class HouseOverrideManager : public OverrideManagerBase {
 
public:
 
	HouseOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
 
			OverrideManagerBase(offset, maximum, invalid) {}
 

	
 
	void SetEntitySpec(const HouseSpec *hs);
 
};
 

	
 

	
 
struct IndustrySpec;
 
class IndustryOverrideManager : public OverrideManagerBase {
 
public:
 
	IndustryOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
 
			OverrideManagerBase(offset, maximum, invalid) {}
 

	
 
	virtual uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id);
 
	virtual uint16 GetID(uint8 grf_local_id, uint32 grfid) const;
 
	uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id) override;
 
	uint16 GetID(uint8 grf_local_id, uint32 grfid) const override;
 

	
 
	void SetEntitySpec(IndustrySpec *inds);
 
};
 

	
 

	
 
struct IndustryTileSpec;
 
class IndustryTileOverrideManager : public OverrideManagerBase {
src/textfile_gui.h
Show inline comments
 
@@ -29,23 +29,27 @@ struct TextfileWindow : public Window, M
 
	uint search_iterator;                ///< Iterator for the font check search.
 

	
 
	static const int TOP_SPACING    = WD_FRAMETEXT_TOP;    ///< Additional spacing at the top of the #WID_TF_BACKGROUND widget.
 
	static const int BOTTOM_SPACING = WD_FRAMETEXT_BOTTOM; ///< Additional spacing at the bottom of the #WID_TF_BACKGROUND widget.
 

	
 
	TextfileWindow(TextfileType file_type);
 
	virtual ~TextfileWindow();
 
	virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize);
 
	virtual void OnClick(Point pt, int widget, int click_count);
 
	virtual void DrawWidget(const Rect &r, int widget) const;
 
	virtual void OnResize();
 
	virtual void Reset();
 
	virtual FontSize DefaultSize();
 
	virtual const char *NextString();
 
	virtual bool Monospace();
 
	virtual void SetFontNames(FreeTypeSettings *settings, const char *font_name);
 
	~TextfileWindow();
 

	
 
	void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override;
 
	void OnClick(Point pt, int widget, int click_count) override;
 
	void DrawWidget(const Rect &r, int widget) const override;
 
	void OnResize() override;
 

	
 
	void Reset() override;
 
	FontSize DefaultSize() override;
 
	const char *NextString() override;
 
	bool Monospace() override;
 
	void SetFontNames(FreeTypeSettings *settings, const char *font_name) override;
 

	
 
	virtual void LoadTextfile(const char *textfile, Subdirectory dir);
 

	
 
private:
 
	uint GetContentHeight();
 
	void SetupScrollbars();
 
};
 

	
 
#endif /* TEXTFILE_GUI_H */
0 comments (0 inline, 0 general)