1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 05:34:12 +01:00

Codechange: strongly type CompanyID

This commit is contained in:
Rubidium
2025-02-10 18:08:53 +01:00
committed by rubidium42
parent 5401ab1f7b
commit ab8177ea77
37 changed files with 92 additions and 97 deletions

View File

@@ -57,7 +57,7 @@ struct GraphLegendWindow : Window {
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; ++c) {
if (!_legend_excluded_companies.Test(c)) this->LowerWidget(WID_GL_FIRST_COMPANY + c);
this->OnInvalidateData(c);
this->OnInvalidateData(c.base());
}
}
@@ -710,7 +710,7 @@ public:
DataSet &dataset = this->data.emplace_back();
dataset.colour = GetColourGradient(c->colour, SHADE_LIGHTER);
dataset.exclude_bit = k;
dataset.exclude_bit = k.base();
for (int j = this->num_on_x_axis, i = 0; --j >= 0;) {
if (j >= c->num_valid_stat_ent) {
@@ -1269,7 +1269,7 @@ struct PerformanceRatingDetailWindow : Window {
this->UpdateCompanyStats();
this->InitNested(window_number);
this->OnInvalidateData(INVALID_COMPANY);
this->OnInvalidateData(INVALID_COMPANY.base());
}
void UpdateCompanyStats()