summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-03-27 19:02:18 +0000
committerpeter1138 <peter1138@openttd.org>2008-03-27 19:02:18 +0000
commit5ddb78af9fdaee3edc40b30eee6e2ccad4864f67 (patch)
tree6e62b616444c23835c4f0bf6f3d6e98e125db001 /src/ai
parent7df7a3069c010efd6994e373153833a8c7917ec1 (diff)
downloadopenttd-5ddb78af9fdaee3edc40b30eee6e2ccad4864f67.tar.xz
(svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/default/default.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 4a160de5a..6deebc02d 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -2460,7 +2460,7 @@ static EngineID AiFindBestWagon(CargoID cargo, RailType railtype)
uint16 best_speed = 0;
uint speed;
- for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
+ FOR_ALL_ENGINEIDS_OF_TYPE(i, VEH_TRAIN) {
const RailVehicleInfo *rvi = RailVehInfo(i);
const Engine* e = GetEngine(i);