summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_storypageelementlist.cpp3
-rw-r--r--src/script/api/script_storypagelist.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/script/api/script_storypageelementlist.cpp b/src/script/api/script_storypageelementlist.cpp
index 5df7dbf0a..ce60963f2 100644
--- a/src/script/api/script_storypageelementlist.cpp
+++ b/src/script/api/script_storypageelementlist.cpp
@@ -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);
}
diff --git a/src/script/api/script_storypagelist.cpp b/src/script/api/script_storypagelist.cpp
index fc515472a..63f835ada 100644
--- a/src/script/api/script_storypagelist.cpp
+++ b/src/script/api/script_storypagelist.cpp
@@ -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);
}