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

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.
@@ -569,8 +567,7 @@ public:
}
byte nums = 0;
const Company *c;
FOR_ALL_COMPANIES(c) {
for (const Company *c : Company::Iterate()) {
nums = min(this->num_vert_lines, max(nums, c->num_valid_stat_ent));
}
@@ -594,7 +591,7 @@ public:
int numd = 0;
for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) {
c = Company::GetIfValid(k);
const Company *c = Company::GetIfValid(k);
if (c != nullptr) {
this->colours[numd] = _colour_gradient[c->colour][6];
for (int j = this->num_on_x_axis, i = 0; --j >= 0;) {
@@ -1138,8 +1135,7 @@ private:
this->companies.clear();
const Company *c;
FOR_ALL_COMPANIES(c) {
for (const Company *c : Company::Iterate()) {
this->companies.push_back(c);
}
@@ -1221,8 +1217,7 @@ public:
this->icon_width = d.width + 2;
this->line_height = max<int>(d.height + 2, FONT_HEIGHT_NORMAL);
const Company *c;
FOR_ALL_COMPANIES(c) {
for (const Company *c : Company::Iterate()) {
SetDParam(0, c->index);
SetDParam(1, c->index);
SetDParam(2, _performance_titles[widest_title]);
@@ -1301,8 +1296,7 @@ struct PerformanceRatingDetailWindow : Window {
{
/* Update all company stats with the current data
* (this is because _score_info is not saved to a savegame) */
Company *c;
FOR_ALL_COMPANIES(c) {
for (Company *c : Company::Iterate()) {
UpdateCompanyRatingAndValue(c, false);
}
@@ -1499,8 +1493,7 @@ struct PerformanceRatingDetailWindow : Window {
}
if (this->company == INVALID_COMPANY) {
const Company *c;
FOR_ALL_COMPANIES(c) {
for (const Company *c : Company::Iterate()) {
this->company = c->index;
break;
}