summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-08-22 22:59:42 +0000
committerglx <glx@openttd.org>2006-08-22 22:59:42 +0000
commitf0e00996e005fbd2698a4717640214ba48de527c (patch)
tree5465abec279b3dc2cf8cc7999a7e09004572ca39 /engine.c
parent42a0c0b3fe871e9d4a6a2cde646777d924aa5ccb (diff)
downloadopenttd-f0e00996e005fbd2698a4717640214ba48de527c.tar.xz
(svn r6059) -Fix(r6049): FOR_ALL was not use to not skip invalid items, so really don't skip invalid items :)
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine.c b/engine.c
index d9ff4b01a..0bcce2904 100644
--- a/engine.c
+++ b/engine.c
@@ -459,7 +459,7 @@ static void EngineRenewPoolNewBlock(uint start_item)
/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
* TODO - This is just a temporary stage, this will be removed. */
- for (er = GetEngineRenew(start_item); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) if (er->from != INVALID_ENGINE) {
+ for (er = GetEngineRenew(start_item); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) {
er->index = start_item++;
er->from = INVALID_ENGINE;
}
@@ -472,7 +472,7 @@ static EngineRenew *AllocateEngineRenew(void)
/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
* TODO - This is just a temporary stage, this will be removed. */
- for (er = GetEngineRenew(0); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) if (er->from != INVALID_ENGINE) {
+ for (er = GetEngineRenew(0); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) {
if (IsValidEngineRenew(er)) continue;
er->to = INVALID_ENGINE;