Update to 1.10.0-beta2

This commit is contained in:
dP
2020-01-06 18:49:34 +03:00
parent 599ccf0c2b
commit c7c3966eec
1366 changed files with 2926 additions and 5639 deletions
+2 -6
View File
@@ -1,5 +1,3 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -159,8 +157,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3
/* Allow at most 128 elements per page. */
uint16 element_count = 0;
StoryPageElement *iter;
FOR_ALL_STORY_PAGE_ELEMENTS(iter) {
for (StoryPageElement *iter : StoryPageElement::Iterate()) {
if (iter->page == page_id) element_count++;
}
if (element_count >= 128) return CMD_ERROR;
@@ -319,8 +316,7 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (flags & DC_EXEC) {
StoryPage *p = StoryPage::Get(page_id);
StoryPageElement *pe;
FOR_ALL_STORY_PAGE_ELEMENTS(pe) {
for (StoryPageElement *pe : StoryPageElement::Iterate()) {
if (pe->page == p->index) {
delete pe;
}