summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
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);