diff options
author | smatz <smatz@openttd.org> | 2009-07-01 17:43:26 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-07-01 17:43:26 +0000 |
commit | f4d0d94184ba53d4c5d1343b69bb05e7fa735bff (patch) | |
tree | dea54822153f6e578140cbdd847bc5f4ed864230 /src/ai | |
parent | 023f78b5ff76b15777d6d7db73adcb9a6673c543 (diff) | |
download | openttd-f4d0d94184ba53d4c5d1343b69bb05e7fa735bff.tar.xz |
(svn r16711) -Codechange: use FOR_ALL_SUBSIDIES macro when iterating over all subsidies
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_subsidylist.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ai/api/ai_subsidylist.cpp b/src/ai/api/ai_subsidylist.cpp index cfda16e9a..d372b4b2f 100644 --- a/src/ai/api/ai_subsidylist.cpp +++ b/src/ai/api/ai_subsidylist.cpp @@ -8,7 +8,8 @@ AISubsidyList::AISubsidyList() { - for (uint i = 0; i < lengthof(_subsidies); i++) { - if (AISubsidy::IsValidSubsidy(i)) this->AddItem(i); + const Subsidy *s; + FOR_ALL_SUBSIDIES(s) { + this->AddItem(s - _subsidies); } } |