summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
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 */