summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-03-03 22:25:13 +0000
committerMichael Lutz <michi@icosahedron.de>2019-03-24 16:10:04 +0100
commitaf7d9020a15c1b1a14b3981ac73c70d2e58cc877 (patch)
tree1dcff3e01382ea3a0a4733a4637659dbbfd4bad5 /src/strings.cpp
parent31260e66252fb4d0dda6f992520faeeb96929cfe (diff)
downloadopenttd-af7d9020a15c1b1a14b3981ac73c70d2e58cc877.tar.xz
Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index c4ae5218a..57a175702 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -2032,18 +2032,18 @@ class LanguagePackGlyphSearcher : public MissingGlyphSearcher {
uint i; ///< Iterator for the primary language tables.
uint j; ///< Iterator for the secondary language tables.
- /* virtual */ void Reset()
+ void Reset() override
{
this->i = 0;
this->j = 0;
}
- /* virtual */ FontSize DefaultSize()
+ FontSize DefaultSize() override
{
return FS_NORMAL;
}
- /* virtual */ const char *NextString()
+ const char *NextString() override
{
if (this->i >= TEXT_TAB_END) return NULL;
@@ -2058,12 +2058,12 @@ class LanguagePackGlyphSearcher : public MissingGlyphSearcher {
return ret;
}
- /* virtual */ bool Monospace()
+ bool Monospace() override
{
return false;
}
- /* virtual */ void SetFontNames(FreeTypeSettings *settings, const char *font_name)
+ void SetFontNames(FreeTypeSettings *settings, const char *font_name) override
{
#ifdef WITH_FREETYPE
strecpy(settings->small.font, font_name, lastof(settings->small.font));