summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-03 19:25:06 +0000
committerrubidium <rubidium@openttd.org>2007-07-03 19:25:06 +0000
commit2f14d622aeb76ede1e9adc72c2f3349d00105122 (patch)
tree4d5539e11addca827f64c8e14b8c78dd88c3d599 /src/industry_cmd.cpp
parent9534c9795b65f39cc2154a107ee09fd3c914dc93 (diff)
downloadopenttd-2f14d622aeb76ede1e9adc72c2f3349d00105122.tar.xz
(svn r10419) -Fix (r10418): do not compare bitmasks with HASBIT. Thanks to Maedhros for spotting this.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index ce15919a7..188572edf 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1624,7 +1624,7 @@ static void ExtChangeIndustryProduction(Industry *i)
if (indspec->life_type == INDUSTRYLIFE_BLACK_HOLE) return;
- if (HASBIT(indspec->life_type, INDUSTRYLIFE_ORGANIC) || HASBIT(indspec->life_type, INDUSTRYLIFE_EXTRACTIVE)) {
+ if ((indspec->life_type & (INDUSTRYLIFE_ORGANIC | INDUSTRYLIFE_EXTRACTIVE)) != 0) {
for (j = 0; j < 2 && indspec->produced_cargo[j] != CT_INVALID; j++){
uint32 r = Random();
int old_prod, new_prod, percent;
@@ -1666,7 +1666,7 @@ static void ExtChangeIndustryProduction(Industry *i)
}
}
- if (HASBIT(indspec->life_type, INDUSTRYLIFE_PROCESSING)) {
+ if ((indspec->life_type & INDUSTRYLIFE_PROCESSING) != 0) {
if ((byte)(_cur_year - i->last_prod_year) < 5 || !CHANCE16(1, 180)) closeit = false;
}