Mercurial > hg > openttd
diff src/station_cmd.cpp @ 5601:ca6b459bf488 draft
(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().
author | celestar <celestar@openttd.org> |
---|---|
date | Thu, 11 Jan 2007 11:05:01 +0000 (2007-01-11) |
parents | c44c070c5032 |
children | 358c07fb3212 |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -200,7 +200,7 @@ * 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 @@ 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; } }