@@ -420,10 +420,10 @@ struct CompanyFinancesWindow : Window {
|
||||
case WID_CF_EXPS_PRICE2:
|
||||
case WID_CF_EXPS_PRICE3: {
|
||||
const Company *c = Company::Get((CompanyID)this->window_number);
|
||||
int age = std::min(_cur_year - c->inaugurated_year, 2);
|
||||
YearDelta age = std::min<YearDelta>(CalTime::CurYear() - c->inaugurated_year, 2);
|
||||
int wid_offset = widget - WID_CF_EXPS_PRICE1;
|
||||
if (wid_offset <= age) {
|
||||
DrawYearColumn(r, _cur_year - (age - wid_offset), c->yearly_expenses[age - wid_offset]);
|
||||
if (wid_offset <= age.base()) {
|
||||
DrawYearColumn(r, CalTime::CurYear().base() - (age.base() - wid_offset), c->yearly_expenses[age.base() - wid_offset]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1859,7 +1859,7 @@ struct CompanyInfrastructureWindow : Window
|
||||
}
|
||||
|
||||
/* Get the date introduced railtypes as well. */
|
||||
this->railtypes = AddDateIntroducedRailTypes(this->railtypes, MAX_DATE);
|
||||
this->railtypes = AddDateIntroducedRailTypes(this->railtypes, CalTime::MAX_DATE);
|
||||
|
||||
/* Find the used roadtypes. */
|
||||
for (const Engine *e : Engine::IterateType(VEH_ROAD)) {
|
||||
@@ -1869,7 +1869,7 @@ struct CompanyInfrastructureWindow : Window
|
||||
}
|
||||
|
||||
/* Get the date introduced roadtypes as well. */
|
||||
this->roadtypes = AddDateIntroducedRoadTypes(this->roadtypes, MAX_DATE);
|
||||
this->roadtypes = AddDateIntroducedRoadTypes(this->roadtypes, CalTime::MAX_DATE);
|
||||
this->roadtypes &= ~_roadtypes_hidden_mask;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user