diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-03-03 22:25:13 +0000 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-03-24 16:10:04 +0100 |
commit | af7d9020a15c1b1a14b3981ac73c70d2e58cc877 (patch) | |
tree | 1dcff3e01382ea3a0a4733a4637659dbbfd4bad5 /src/ai/ai_scanner.hpp | |
parent | 31260e66252fb4d0dda6f992520faeeb96929cfe (diff) | |
download | openttd-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/ai/ai_scanner.hpp')
-rw-r--r-- | src/ai/ai_scanner.hpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp index d8e8a6993..dafc340be 100644 --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -19,7 +19,7 @@ public: AIScannerInfo(); ~AIScannerInfo(); - /* virtual */ void Initialize(); + void Initialize() override; /** * Select a random AI. @@ -42,11 +42,11 @@ public: void SetDummyAI(class AIInfo *info); protected: - /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last); - /* virtual */ const char *GetFileName() const { return PATHSEP "info.nut"; } - /* virtual */ Subdirectory GetDirectory() const { return AI_DIR; } - /* virtual */ const char *GetScannerName() const { return "AIs"; } - /* virtual */ void RegisterAPI(class Squirrel *engine); + void GetScriptName(ScriptInfo *info, char *name, const char *last) override; + const char *GetFileName() const override { return PATHSEP "info.nut"; } + Subdirectory GetDirectory() const override { return AI_DIR; } + const char *GetScannerName() const override { return "AIs"; } + void RegisterAPI(class Squirrel *engine) override; private: AIInfo *info_dummy; ///< The dummy AI. @@ -54,7 +54,7 @@ private: class AIScannerLibrary : public ScriptScanner { public: - /* virtual */ void Initialize(); + void Initialize() override; /** * Find a library in the pool. @@ -65,11 +65,11 @@ public: class AILibrary *FindLibrary(const char *library, int version); protected: - /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last); - /* virtual */ const char *GetFileName() const { return PATHSEP "library.nut"; } - /* virtual */ Subdirectory GetDirectory() const { return AI_LIBRARY_DIR; } - /* virtual */ const char *GetScannerName() const { return "AI Libraries"; } - /* virtual */ void RegisterAPI(class Squirrel *engine); + void GetScriptName(ScriptInfo *info, char *name, const char *last) override; + const char *GetFileName() const override { return PATHSEP "library.nut"; } + Subdirectory GetDirectory() const override { return AI_LIBRARY_DIR; } + const char *GetScannerName() const override { return "AI Libraries"; } + void RegisterAPI(class Squirrel *engine) override; }; #endif /* AI_SCANNER_HPP */ |