diff options
author | frosch <frosch@openttd.org> | 2013-10-12 16:35:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-10-12 16:35:32 +0000 |
commit | 29f5eab56cac833ee0c4c6377c74c1c7f17174bf (patch) | |
tree | 62d7f30992063143ee2b8b9a566f01ee34831c92 | |
parent | 1b6ceef0862928ad93434fac78679a00b5867367 (diff) | |
download | openttd-29f5eab56cac833ee0c4c6377c74c1c7f17174bf.tar.xz |
(svn r25843) -Codechange: Rename MAX_SPECLIST to NUM_STATIONSSPECS_PER_STATION.
-rw-r--r-- | src/newgrf_station.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 713961239..e74b24d22 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -48,7 +48,7 @@ bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const INSTANTIATE_NEWGRF_CLASS_METHODS(StationClass, StationSpec, StationClassID, STAT_CLASS_MAX) -static const uint MAX_SPECLIST = 255; +static const uint NUM_STATIONSSPECS_PER_STATION = 255; ///< Maximum number of parts per station. enum TriggerArea { TA_TILE, @@ -697,17 +697,17 @@ int AllocateSpecToStation(const StationSpec *statspec, BaseStation *st, bool exe if (statspec == NULL || st == NULL) return 0; - for (i = 1; i < st->num_specs && i < MAX_SPECLIST; i++) { + for (i = 1; i < st->num_specs && i < NUM_STATIONSSPECS_PER_STATION; i++) { if (st->speclist[i].spec == NULL && st->speclist[i].grfid == 0) break; } - if (i == MAX_SPECLIST) { + if (i == NUM_STATIONSSPECS_PER_STATION) { /* As final effort when the spec list is already full... * try to find the same spec and return that one. This might * result in slightly "wrong" (as per specs) looking stations, * but it's fairly unlikely that one reaches the limit anyways. */ - for (i = 1; i < st->num_specs && i < MAX_SPECLIST; i++) { + for (i = 1; i < st->num_specs && i < NUM_STATIONSSPECS_PER_STATION; i++) { if (st->speclist[i].spec == statspec) return i; } |