diff options
author | glx <glx@openttd.org> | 2019-12-17 21:21:33 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | 847e5f33d4749568cda696b8940ec10b540bd6fb (patch) | |
tree | 1e61e1586e351722db89f537b9222a50f278abb0 /src/story_gui.cpp | |
parent | 869581eb238b820574d64cd8dabc9324cd7a0dd5 (diff) | |
download | openttd-847e5f33d4749568cda696b8940ec10b540bd6fb.tar.xz |
Codechange: Replace story related FOR_ALL with range-based for loops
Diffstat (limited to 'src/story_gui.cpp')
-rw-r--r-- | src/story_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/story_gui.cpp b/src/story_gui.cpp index a14dab994..677d88bba 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -52,8 +52,7 @@ protected: if (this->story_pages.NeedRebuild()) { this->story_pages.clear(); - const StoryPage *p; - FOR_ALL_STORY_PAGES(p) { + for (const StoryPage *p : StoryPage::Iterate()) { if (this->IsPageAvailable(p)) { this->story_pages.push_back(p); } @@ -80,8 +79,7 @@ protected: const StoryPage *p = GetSelPage(); if (p != nullptr) { - const StoryPageElement *pe; - FOR_ALL_STORY_PAGE_ELEMENTS(pe) { + for (const StoryPageElement *pe : StoryPageElement::Iterate()) { if (pe->page == p->index) { this->story_page_elements.push_back(pe); } |