summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-15 19:52:44 +0000
committertruebrain <truebrain@openttd.org>2011-12-15 19:52:44 +0000
commit2ecbe895093f91bfdecbd8ab29d0641c2fd9a0f3 (patch)
tree7c29cca8d7d197c96fa57981168252c681466bad
parentefb37bb919bb6bf8e997e37c7433297213de13c9 (diff)
downloadopenttd-2ecbe895093f91bfdecbd8ab29d0641c2fd9a0f3.tar.xz
(svn r23524) -Codechange: move the name of the scanner to a level deeper
-rw-r--r--src/ai/ai_core.cpp4
-rw-r--r--src/ai/ai_scanner.cpp9
-rw-r--r--src/ai/ai_scanner.hpp4
3 files changed, 12 insertions, 5 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp
index ac2f00f65..de4034b6b 100644
--- 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();
}
}
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 6dfebc4ac..3ab0b431e 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -27,9 +27,9 @@ AIScannerInfo::AIScannerInfo() :
{
}
-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 @@ AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool fo
}
+void AIScannerLibrary::Initialize()
+{
+ ScriptScanner::Initialize("AIScanner");
+}
+
void AIScannerLibrary::GetScriptName(ScriptInfo *info, char *name, int len)
{
AILibrary *library = static_cast<AILibrary *>(info);
diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp
index 2f55c8594..97fdba04c 100644
--- a/src/ai/ai_scanner.hpp
+++ b/src/ai/ai_scanner.hpp
@@ -19,7 +19,7 @@ public:
AIScannerInfo();
~AIScannerInfo();
- /* virtual */ void Initialize(const char *name);
+ /* virtual */ void Initialize();
/**
* Select a random AI.
@@ -54,6 +54,8 @@ private:
class AIScannerLibrary : public ScriptScanner {
public:
+ /* virtual */ void Initialize();
+
/**
* Find a library in the pool.
* @param library The library name to find.