diff options
author | rubidium <rubidium@openttd.org> | 2008-10-14 18:38:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-10-14 18:38:51 +0000 |
commit | b5e467978b70884033d8e25a4a9738cc17699e4e (patch) | |
tree | a41b987e5fdc223ac9abf159f9ee753f07f2234d /src/ai/default/default.cpp | |
parent | 6e397dd3f0b4999c65f0ad5d35fa9007bc6bc9d8 (diff) | |
download | openttd-b5e467978b70884033d8e25a4a9738cc17699e4e.tar.xz |
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r-- | src/ai/default/default.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 4b20500de..73c5336dc 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -2158,9 +2158,9 @@ static void AiBuildRailConstruct(Company *c) arf.depth = 0; arf.recursive_mode = 0; arf.best_ptr = NULL; - arf.cur_best_dist = (uint)-1; + arf.cur_best_dist = UINT_MAX; arf.cur_best_depth = 0xff; - arf.best_dist = (uint)-1; + arf.best_dist = UINT_MAX; arf.best_depth = 0xff; arf.cur_best_tile = 0; arf.best_tile = 0; @@ -2855,7 +2855,7 @@ static bool AiCheckRoadPathBetter(AiRoadFinder *arf, const byte *p) } } arf->recursive_mode = 0; - arf->cur_best_dist = (uint)-1; + arf->cur_best_dist = UINT_MAX; arf->cur_best_depth = 0xff; return better; @@ -2892,7 +2892,7 @@ static bool AiCheckRoadFinished(Company *c) TrackdirBits bits = TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, ROADTYPES_ROAD)) & DiagdirReachesTrackdirs(dir); if (bits == TRACKDIR_BIT_NONE) return false; - are.best_dist = (uint)-1; + are.best_dist = UINT_MAX; while (bits != TRACKDIR_BIT_NONE) { Trackdir trackdir = RemoveFirstTrackdir(&bits); @@ -3058,9 +3058,9 @@ static void AiBuildRoadConstruct(Company *c) arf.depth = 0; arf.recursive_mode = 0; arf.best_ptr = NULL; - arf.cur_best_dist = (uint)-1; + arf.cur_best_dist = UINT_MAX; arf.cur_best_depth = 0xff; - arf.best_dist = (uint)-1; + arf.best_dist = UINT_MAX; arf.best_depth = 0xff; arf.cur_best_tile = 0; arf.best_tile = 0; |