summaryrefslogtreecommitdiff
path: root/src/ai/default
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
commita729283a3c3388f015fc424db50761b47d93bf08 (patch)
tree6e62b616444c23835c4f0bf6f3d6e98e125db001 /src/ai/default
parentd275282e4ddd77523d11321e5d5484689ae18211 (diff)
downloadopenttd-a729283a3c3388f015fc424db50761b47d93bf08.tar.xz
(svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops
Diffstat (limited to 'src/ai/default')
-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);