summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 15:23:47 +0000
committersmatz <smatz@openttd.org>2009-05-22 15:23:47 +0000
commit10d1ef5447b94d17024dc0f4bdd1b7b017431a23 (patch)
treea9563d19933124547ccd3d6c0e53c44876bdc144 /src/industry_gui.cpp
parent62a7948af0ca9eb3b190a54918201e1075edcbbc (diff)
downloadopenttd-10d1ef5447b94d17024dc0f4bdd1b7b017431a23.tar.xz
(svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 65cdeac4f..526b89421 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -334,7 +334,7 @@ public:
if (this->selected_type == INVALID_INDUSTRYTYPE) {
this->HandleButtonClick(DPIW_FUND_WIDGET);
- if (GetNumTowns() == 0) {
+ if (Town::GetNumItems() == 0) {
ShowErrorMessage(STR_ERROR_MUST_BUILD_TOWN_FIRST, STR_CAN_T_GENERATE_INDUSTRIES, 0, 0);
} else {
extern void GenerateIndustries();
@@ -368,7 +368,7 @@ public:
if (_game_mode == GM_EDITOR) {
/* Show error if no town exists at all */
- if (GetNumTowns() == 0) {
+ if (Town::GetNumItems() == 0) {
SetDParam(0, indsp->name);
ShowErrorMessage(STR_ERROR_MUST_BUILD_TOWN_FIRST, STR_ERROR_CAN_T_BUILD_HERE, pt.x, pt.y);
return;