summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-27 13:31:26 +0000
committersmatz <smatz@openttd.org>2009-08-27 13:31:26 +0000
commit100ae8efcc592ec44f0cc161e0045fb84b67c45e (patch)
tree79e23872457025fcbbc5f0a92e071c53d687ec7b /src/industry_gui.cpp
parent984efae368da7a7a7e5090820ef31c9c3a678670 (diff)
downloadopenttd-100ae8efcc592ec44f0cc161e0045fb84b67c45e.tar.xz
(svn r17292) -Codechange: use unified ToPercent() function to convert fract numbers to percents
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 9cc76a5ef..6276d9411 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -554,7 +554,7 @@ public:
SetDParam(1, i->last_month_production[j]);
SetDParam(2, GetCargoSuffix(j + 3, CST_VIEW, i, i->type, ind));
- SetDParam(3, i->last_month_pct_transported[j] * 100 >> 8);
+ SetDParam(3, ToPercent8(i->last_month_pct_transported[j]));
uint x = 4 + (IsProductionAlterable(i) ? 30 : 0);
DrawString(x, this->widget[IVW_INFO].right, y, STR_INDUSTRY_VIEW_TRANSPORTED);
/* Let's put out those buttons.. */
@@ -833,7 +833,7 @@ protected:
assert(id < lengthof(i->produced_cargo));
if (i->produced_cargo[id] == CT_INVALID) return 101;
- return i->last_month_pct_transported[id] * 100 >> 8;
+ return ToPercent8(i->last_month_pct_transported[id]);
}
/**
@@ -968,7 +968,7 @@ public:
/* Transported productions */
for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
if (i->produced_cargo[j] == CT_INVALID) continue;
- SetDParam(p++, i->last_month_pct_transported[j] * 100 >> 8);
+ SetDParam(p++, ToPercent8(i->last_month_pct_transported[j]));
}
/* Drawing the right string */