Codechange: [Script] Use ScriptList::FillList() in more locations (#11762)

This commit is contained in:
Loïc Guilloux
2024-01-12 21:19:08 +01:00
committed by GitHub
parent 60da6b992e
commit 54b57fbfeb
4 changed files with 19 additions and 17 deletions

View File

@@ -17,9 +17,7 @@ ScriptStoryPageElementList::ScriptStoryPageElementList(ScriptStoryPage::StoryPag
{
if (!ScriptStoryPage::IsValidStoryPage(story_page_id)) return;
for (StoryPageElement *pe : StoryPageElement::Iterate()) {
if (pe->page == story_page_id) {
this->AddItem(pe->index);
}
}
ScriptList::FillList<StoryPageElement>(this,
[story_page_id](const StoryPageElement *pe) {return pe->page == story_page_id; }
);
}