summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-24 16:23:46 +0000
committerCharles Pigott <charlespigott@googlemail.com>2019-03-24 17:38:42 +0000
commitb1fb3f4fb8c389d36ba670558a169578f7d142e2 (patch)
tree8a3ba2c2479da365750a1aa87490aab27971ceb3
parente6bb90543e885d20814b4829c94c04909a311b71 (diff)
downloadopenttd-b1fb3f4fb8c389d36ba670558a169578f7d142e2.tar.xz
Codechange: More use of override keyword.
-rw-r--r--src/newgrf_commons.h6
-rw-r--r--src/textfile_gui.h24
2 files changed, 18 insertions, 12 deletions
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 5721b7eb2..a5cedf429 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -228,6 +228,7 @@ class HouseOverrideManager : public OverrideManagerBase {
public:
HouseOverrideManager(uint16 offset, uint16 maximum, uint16 invalid) :
OverrideManagerBase(offset, maximum, invalid) {}
+
void SetEntitySpec(const HouseSpec *hs);
};
@@ -238,8 +239,9 @@ 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);
};
diff --git a/src/textfile_gui.h b/src/textfile_gui.h
index 9495fa3f0..b7bcb2db7 100644
--- a/src/textfile_gui.h
+++ b/src/textfile_gui.h
@@ -32,17 +32,21 @@ struct TextfileWindow : public Window, MissingGlyphSearcher {
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();