mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r18102) -Codechange: simplify Company::Get(this->window_number)->index to just this->window_number
This commit is contained in:
parent
60c04c25a2
commit
c71e3548d7
@ -303,11 +303,10 @@ struct CompanyFinancesWindow : Window {
|
|||||||
|
|
||||||
virtual void SetStringParameters(int widget) const
|
virtual void SetStringParameters(int widget) const
|
||||||
{
|
{
|
||||||
const Company *c = Company::Get((CompanyID)this->window_number);
|
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case CFW_CAPTION:
|
case CFW_CAPTION:
|
||||||
SetDParam(0, c->index);
|
SetDParam(0, (CompanyID)this->window_number);
|
||||||
SetDParam(1, c->index);
|
SetDParam(1, (CompanyID)this->window_number);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CFW_MAXLOAN_VALUE:
|
case CFW_MAXLOAN_VALUE:
|
||||||
@ -1688,9 +1687,8 @@ struct CompanyWindow : Window
|
|||||||
virtual void SetStringParameters(int widget) const
|
virtual void SetStringParameters(int widget) const
|
||||||
{
|
{
|
||||||
if (widget == CW_WIDGET_CAPTION) {
|
if (widget == CW_WIDGET_CAPTION) {
|
||||||
const Company *c = Company::Get((CompanyID)this->window_number);
|
SetDParam(0, (CompanyID)this->window_number);
|
||||||
SetDParam(0, c->index);
|
SetDParam(1, (CompanyID)this->window_number);
|
||||||
SetDParam(1, c->index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user