Mercurial > hg > openttd
changeset 18676:9e9c2bc58ba0 draft
(svn r23524) -Codechange: move the name of the scanner to a level deeper
author | truebrain <truebrain@openttd.org> |
---|---|
date | Thu, 15 Dec 2011 19:52:44 +0000 |
parents | 919ebb53e11a |
children | 7077d1f6763b |
files | src/ai/ai_core.cpp src/ai/ai_scanner.cpp src/ai/ai_scanner.hpp |
diffstat | 3 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -143,9 +143,9 @@ if (AI::scanner_info == NULL) { TarScanner::DoScan(TarScanner::AI); AI::scanner_info = new AIScannerInfo(); - AI::scanner_info->Initialize("AIScanner"); + AI::scanner_info->Initialize(); AI::scanner_library = new AIScannerLibrary(); - AI::scanner_library->Initialize("AISCanner"); + AI::scanner_library->Initialize(); } }
--- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -27,9 +27,9 @@ { } -void AIScannerInfo::Initialize(const char *name) +void AIScannerInfo::Initialize() { - ScriptScanner::Initialize(name); + ScriptScanner::Initialize("AIScanner"); /* Create the dummy AI */ free(this->main_script); @@ -140,6 +140,11 @@ } +void AIScannerLibrary::Initialize() +{ + ScriptScanner::Initialize("AIScanner"); +} + void AIScannerLibrary::GetScriptName(ScriptInfo *info, char *name, int len) { AILibrary *library = static_cast<AILibrary *>(info);
--- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -19,7 +19,7 @@ AIScannerInfo(); ~AIScannerInfo(); - /* virtual */ void Initialize(const char *name); + /* virtual */ void Initialize(); /** * Select a random AI. @@ -54,6 +54,8 @@ class AIScannerLibrary : public ScriptScanner { public: + /* virtual */ void Initialize(); + /** * Find a library in the pool. * @param library The library name to find.