summaryrefslogtreecommitdiff
path: root/src/company_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-10-03 17:24:31 +0000
committerfrosch <frosch@openttd.org>2011-10-03 17:24:31 +0000
commit1a12008fcf0808d2426158c25e579158c47d94d0 (patch)
treea0275bc05f4092ce27dddb639355d8354a4a8442 /src/company_gui.cpp
parentdd74536bef66a4e1d214caab38805d0c70acb075 (diff)
downloadopenttd-1a12008fcf0808d2426158c25e579158c47d94d0.tar.xz
(svn r22982) -Cleanup: Remove CountCompanyVehicles() and use ALL_GROUP statistics instead.
Diffstat (limited to 'src/company_gui.cpp')
-rw-r--r--src/company_gui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index a79ef5eb1..a224c1dcc 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -1888,7 +1888,10 @@ struct CompanyWindow : Window
case CW_WIDGET_DESC_VEHICLE_COUNTS: {
uint amounts[4];
- CountCompanyVehicles((CompanyID)this->window_number, amounts);
+ amounts[0] = c->group_all[VEH_TRAIN].num_vehicle;
+ amounts[1] = c->group_all[VEH_ROAD].num_vehicle;
+ amounts[2] = c->group_all[VEH_SHIP].num_vehicle;
+ amounts[3] = c->group_all[VEH_AIRCRAFT].num_vehicle;
int y = r.top;
if (amounts[0] + amounts[1] + amounts[2] + amounts[3] == 0) {