From f4d0d94184ba53d4c5d1343b69bb05e7fa735bff Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 1 Jul 2009 17:43:26 +0000 Subject: (svn r16711) -Codechange: use FOR_ALL_SUBSIDIES macro when iterating over all subsidies --- src/ai/api/ai_subsidylist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ai/api') 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); } } -- cgit v1.2.3-70-g09d2