Codechange: Replace story related FOR_ALL with range-based for loops
This commit is contained in:
@@ -17,8 +17,7 @@ ScriptStoryPageElementList::ScriptStoryPageElementList(ScriptStoryPage::StoryPag
|
||||
{
|
||||
if (!ScriptStoryPage::IsValidStoryPage(story_page_id)) return;
|
||||
|
||||
StoryPageElement *pe;
|
||||
FOR_ALL_STORY_PAGE_ELEMENTS(pe) {
|
||||
for (StoryPageElement *pe : StoryPageElement::Iterate()) {
|
||||
if (pe->page == story_page_id) {
|
||||
this->AddItem(pe->index);
|
||||
}
|
||||
|
@@ -19,8 +19,7 @@ ScriptStoryPageList::ScriptStoryPageList(ScriptCompany::CompanyID company)
|
||||
uint8 c = company;
|
||||
if (company == ScriptCompany::COMPANY_INVALID) c = INVALID_COMPANY;
|
||||
|
||||
StoryPage *p;
|
||||
FOR_ALL_STORY_PAGES(p) {
|
||||
for (StoryPage *p : StoryPage::Iterate()) {
|
||||
if (p->company == c || p->company == INVALID_COMPANY) {
|
||||
this->AddItem(p->index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user