(svn r23524) -Codechange: move the name of the scanner to a level deeper

This commit is contained in:
truebrain 2011-12-15 19:52:44 +00:00
parent 7bfc3ccd84
commit df0f8f8422
3 changed files with 12 additions and 5 deletions

View File

@ -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();
}
}

View File

@ -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);

View File

@ -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.