diff options
author | smatz <smatz@openttd.org> | 2009-05-17 01:00:56 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-17 01:00:56 +0000 |
commit | 871107f52952ee59c353feab933126ed206e60bf (patch) | |
tree | 482884dfedc1700bddb8812f1de755212ed8bb22 /src/ai/ai_gui.cpp | |
parent | ed1e54bd84074412ea9f273b7cd86aed42d844ce (diff) | |
download | openttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz |
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/ai/ai_gui.cpp')
-rw-r--r-- | src/ai/ai_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index ac8401dff..f0ffee121 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -641,7 +641,7 @@ struct AIDebugWindow : public Window { { /* Disable the companies who are not active or not an AI */ for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - this->SetWidgetDisabledState(i + AID_WIDGET_COMPANY_BUTTON_START, !IsValidCompanyID(i) || !Company::Get(i)->is_ai); + this->SetWidgetDisabledState(i + AID_WIDGET_COMPANY_BUTTON_START, !Company::IsValidID(i) || !Company::Get(i)->is_ai); } this->DisableWidget(AID_WIDGET_RELOAD_TOGGLE); @@ -659,7 +659,7 @@ struct AIDebugWindow : public Window { virtual void OnPaint() { /* Check if the currently selected company is still active. */ - if (ai_debug_company == INVALID_COMPANY || !IsValidCompanyID(ai_debug_company)) { + if (ai_debug_company == INVALID_COMPANY || !Company::IsValidID(ai_debug_company)) { if (ai_debug_company != INVALID_COMPANY) { /* Raise and disable the widget for the previous selection. */ this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START); @@ -669,7 +669,7 @@ struct AIDebugWindow : public Window { } for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - if (IsValidCompanyID(i) && Company::Get(i)->is_ai) { + if (Company::IsValidID(i) && Company::Get(i)->is_ai) { /* Lower the widget corresponding to this company. */ this->LowerWidget(i + AID_WIDGET_COMPANY_BUTTON_START); @@ -690,7 +690,7 @@ struct AIDebugWindow : public Window { /* Paint the company icons */ for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - if (!IsValidCompanyID(i) || !Company::Get(i)->is_ai) { + if (!Company::IsValidID(i) || !Company::Get(i)->is_ai) { /* Check if we have the company as an active company */ if (!this->IsWidgetDisabled(i + AID_WIDGET_COMPANY_BUTTON_START)) { /* Bah, company gone :( */ |