summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-15 11:46:49 +0000
committertron <tron@openttd.org>2005-11-15 11:46:49 +0000
commit7289cc7c07f1d7784f0c877c8d5a0da86a3f1475 (patch)
tree0bba4bcbec8dbc4fc490bfa7376a2ee15cd3556c /ai/default
parentea5672ec8f0452f46c94985e68c66dc304f6e27c (diff)
downloadopenttd-7289cc7c07f1d7784f0c877c8d5a0da86a3f1475.tar.xz
(svn r3190) Turn some loops into canonical for loop form
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index 845428eeb..4f4283f1a 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -1765,8 +1765,7 @@ static void AiStateBuildDefaultRailBlocks(Player *p)
}
// do the following 8 times
- i = 8;
- do {
+ for (i = 0; i < 8; i++) {
// check if we can build the default track
aib = &p->ai.src;
j = p->ai.num_build_rec;
@@ -1808,7 +1807,7 @@ static void AiStateBuildDefaultRailBlocks(Player *p)
assert(r != CMD_ERROR);
}
} while (++aib,--j);
- } while (--i);
+ }
// check if we're done with all of them
aib = &p->ai.src;