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.
This commit is contained in:

committed by
Michael Lutz

parent
31260e6625
commit
af7d9020a1
@@ -30,9 +30,9 @@ public:
|
||||
|
||||
class AIInfo *GetInfo() const;
|
||||
|
||||
/* virtual */ int GetSetting(const char *name) const;
|
||||
/* virtual */ void SetSetting(const char *name, int value);
|
||||
/* virtual */ void AddRandomDeviation();
|
||||
int GetSetting(const char *name) const override;
|
||||
void SetSetting(const char *name, int value) override;
|
||||
void AddRandomDeviation() override;
|
||||
|
||||
/**
|
||||
* When ever the AI Scanner is reloaded, all infos become invalid. This
|
||||
@@ -45,9 +45,9 @@ public:
|
||||
bool ResetInfo(bool force_exact_match);
|
||||
|
||||
protected:
|
||||
/* virtual */ void PushExtraConfigList();
|
||||
/* virtual */ void ClearConfigList();
|
||||
/* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
|
||||
void PushExtraConfigList() override;
|
||||
void ClearConfigList() override;
|
||||
ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match) override;
|
||||
};
|
||||
|
||||
#endif /* AI_CONFIG_HPP */
|
||||
|
@@ -646,7 +646,7 @@ struct ScriptTextfileWindow : public TextfileWindow {
|
||||
this->LoadTextfile(textfile, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR);
|
||||
}
|
||||
|
||||
/* virtual */ void SetStringParameters(int widget) const
|
||||
void SetStringParameters(int widget) const override
|
||||
{
|
||||
if (widget == WID_TF_CAPTION) {
|
||||
SetDParam(0, (slot == OWNER_DEITY) ? STR_CONTENT_TYPE_GAME_SCRIPT : STR_CONTENT_TYPE_AI);
|
||||
|
@@ -25,14 +25,14 @@ public:
|
||||
*/
|
||||
void Initialize(class AIInfo *info);
|
||||
|
||||
/* virtual */ int GetSetting(const char *name);
|
||||
/* virtual */ ScriptInfo *FindLibrary(const char *library, int version);
|
||||
int GetSetting(const char *name) override;
|
||||
ScriptInfo *FindLibrary(const char *library, int version) override;
|
||||
|
||||
private:
|
||||
/* virtual */ void RegisterAPI();
|
||||
/* virtual */ void Died();
|
||||
/* virtual */ CommandCallback *GetDoCommandCallback();
|
||||
/* virtual */ void LoadDummyScript();
|
||||
void RegisterAPI() override;
|
||||
void Died() override;
|
||||
CommandCallback *GetDoCommandCallback() override;
|
||||
void LoadDummyScript() override;
|
||||
};
|
||||
|
||||
#endif /* AI_INSTANCE_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 */
|
||||
|
Reference in New Issue
Block a user