diff options
author | celestar <celestar@openttd.org> | 2007-01-11 11:05:01 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2007-01-11 11:05:01 +0000 |
commit | 2ac0410767683fb0e6315433f9805712cb85f5bd (patch) | |
tree | f9cb6bcd0d0b855706d1e00e0a4ffd2757c7e039 /src/station_cmd.cpp | |
parent | 7996c9e560f61cddba0a3ad48b95c81d9030ef99 (diff) | |
download | openttd-2ac0410767683fb0e6315433f9805712cb85f5bd.tar.xz |
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index adca43cbe..e94da91da 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -200,7 +200,7 @@ RoadStop *AllocateRoadStop(void) * radius that is available within the station */ static uint FindCatchmentRadius(const Station* st) { - uint ret = 0; + CatchmentAera ret = CA_NONE; if (st->bus_stops != NULL) ret = max(ret, CA_BUS); if (st->truck_stops != NULL) ret = max(ret, CA_TRUCK); @@ -2525,7 +2525,7 @@ static void UpdateStationRating(Station *st) if (rating <= 127 && waiting != 0) { uint32 r = Random(); if ( (uint)rating <= (r & 0x7F) ) { - waiting = max(waiting - ((r >> 8)&3) - 1, 0); + waiting = max(waiting - ((r >> 8)&3) - 1, 0U); waiting_changed = true; } } |