summaryrefslogtreecommitdiff
path: root/src/subsidy_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-13 09:44:44 +0000
committerrubidium <rubidium@openttd.org>2010-05-13 09:44:44 +0000
commit398418b8fa23ab59f5fc027a7dd6aeba9da4d7bb (patch)
tree54de30f4702263ee1489af162d6da840e35c0a87 /src/subsidy_base.h
parent793b0f0736ac543fb1f6a7e9a4bfd678891e7374 (diff)
downloadopenttd-398418b8fa23ab59f5fc027a7dd6aeba9da4d7bb.tar.xz
(svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int
Diffstat (limited to 'src/subsidy_base.h')
-rw-r--r--src/subsidy_base.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/subsidy_base.h b/src/subsidy_base.h
index c797c419d..5c09260ad 100644
--- a/src/subsidy_base.h
+++ b/src/subsidy_base.h
@@ -53,14 +53,12 @@ struct Subsidy : SubsidyPool::PoolItem<&_subsidy_pool> {
};
/** Constants related to subsidies */
-enum {
- SUBSIDY_OFFER_MONTHS = 12, ///< Duration of subsidy offer
- SUBSIDY_CONTRACT_MONTHS = 12, ///< Duration of subsidy after awarding
- SUBSIDY_PAX_MIN_POPULATION = 400, ///< Min. population of towns for subsidised pax route
- SUBSIDY_CARGO_MIN_POPULATION = 900, ///< Min. population of destination town for cargo route
- SUBSIDY_MAX_PCT_TRANSPORTED = 42, ///< Subsidy will be created only for towns/industries with less % transported
- SUBSIDY_MAX_DISTANCE = 70, ///< Max. length of subsidised route (DistanceManhattan)
-};
+static const uint SUBSIDY_OFFER_MONTHS = 12; ///< Duration of subsidy offer
+static const uint SUBSIDY_CONTRACT_MONTHS = 12; ///< Duration of subsidy after awarding
+static const uint SUBSIDY_PAX_MIN_POPULATION = 400; ///< Min. population of towns for subsidised pax route
+static const uint SUBSIDY_CARGO_MIN_POPULATION = 900; ///< Min. population of destination town for cargo route
+static const uint SUBSIDY_MAX_PCT_TRANSPORTED = 42; ///< Subsidy will be created only for towns/industries with less % transported
+static const uint SUBSIDY_MAX_DISTANCE = 70; ///< Max. length of subsidised route (DistanceManhattan)
#define FOR_ALL_SUBSIDIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Subsidy, subsidy_index, var, start)
#define FOR_ALL_SUBSIDIES(var) FOR_ALL_SUBSIDIES_FROM(var, 0)