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 | 272b2ef0e9072c6bf2ee3083c3673ae7773462ab (patch) | |
tree | a41b987e5fdc223ac9abf159f9ee753f07f2234d /src/train_cmd.cpp | |
parent | 03bef3fb5b1c25cc887d51e13fd81c7c5129028b (diff) | |
download | openttd-272b2ef0e9072c6bf2ee3083c3673ae7773462ab.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 |