From 5ddb78af9fdaee3edc40b30eee6e2ccad4864f67 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 27 Mar 2008 19:02:18 +0000 Subject: (svn r12451) -Codechange: use of FOR_ALL_ENGINES/ENGINEIDS_OF_TYPE instead of for-loops --- src/ai/default/default.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ai') 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); -- cgit v1.2.3-70-g09d2