diff options
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); } } |