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/train_cmd.cpp | |
parent | 6e397dd3f0b4999c65f0ad5d35fa9007bc6bc9d8 (diff) | |
download | openttd-b5e467978b70884033d8e25a4a9738cc17699e4e.tar.xz |
(svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 69a56ab40..3028ad366 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2205,7 +2205,7 @@ static TrainFindDepotData FindClosestTrainDepot(Vehicle *v, int max_distance) bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse) { TrainFindDepotData tfdd = FindClosestTrainDepot(this, 0); - if (tfdd.best_length == (uint)-1) return false; + if (tfdd.best_length == UINT_MAX) return false; if (location != NULL) *location = tfdd.tile; if (destination != NULL) *destination = GetDepotByTile(tfdd.tile)->index; @@ -4376,7 +4376,7 @@ static void CheckIfTrainNeedsService(Vehicle *v) TrainFindDepotData tfdd = FindClosestTrainDepot(v, MAX_ACCEPTABLE_DEPOT_DIST); /* Only go to the depot if it is not too far out of our way. */ - if (tfdd.best_length == (uint)-1 || tfdd.best_length > MAX_ACCEPTABLE_DEPOT_DIST) { + if (tfdd.best_length == UINT_MAX || tfdd.best_length > MAX_ACCEPTABLE_DEPOT_DIST) { if (v->current_order.IsType(OT_GOTO_DEPOT)) { /* If we were already heading for a depot but it has * suddenly moved farther away, we continue our normal |