Mercurial > hg > openttd
diff src/economy.cpp @ 10297:78a1140e69f0 draft
(svn r14536) -Fix (r14530): Do not expect uints to become negative.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 25 Oct 2008 22:00:51 +0000 (2008-10-25) |
parents | 7fbaffe16c80 |
children | 844e13224bd1 |
line wrap: on
line diff
--- a/src/economy.cpp +++ b/src/economy.cpp @@ -1298,12 +1298,12 @@ if (st->rect.IsEmpty()) return; /* Compute acceptance rectangle */ - uint catchment_radius = st->GetCatchmentRadius(); + int catchment_radius = st->GetCatchmentRadius(); Rect rect = { - max(st->rect.left - catchment_radius, 0u), - max(st->rect.top - catchment_radius, 0u), - min(st->rect.right + catchment_radius, MapMaxX()), - min(st->rect.bottom + catchment_radius, MapMaxY()) + max<int>(st->rect.left - catchment_radius, 0), + max<int>(st->rect.top - catchment_radius, 0), + min<int>(st->rect.right + catchment_radius, MapMaxX()), + min<int>(st->rect.bottom + catchment_radius, MapMaxY()) }; /* Compute maximum extent of acceptance rectangle wrt. station sign */