Mercurial > hg > openttd
changeset 13578:13da6e5ac1a8 draft
(svn r18102) -Codechange: simplify Company::Get(this->window_number)->index to just this->window_number
author | smatz <smatz@openttd.org> |
---|---|
date | Sun, 15 Nov 2009 18:21:17 +0000 |
parents | 27dce4c65d7b |
children | 5ef666e5edc9 |
files | src/company_gui.cpp |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -303,11 +303,10 @@ virtual void SetStringParameters(int widget) const { - const Company *c = Company::Get((CompanyID)this->window_number); switch (widget) { case CFW_CAPTION: - SetDParam(0, c->index); - SetDParam(1, c->index); + SetDParam(0, (CompanyID)this->window_number); + SetDParam(1, (CompanyID)this->window_number); break; case CFW_MAXLOAN_VALUE: @@ -1688,9 +1687,8 @@ virtual void SetStringParameters(int widget) const { if (widget == CW_WIDGET_CAPTION) { - const Company *c = Company::Get((CompanyID)this->window_number); - SetDParam(0, c->index); - SetDParam(1, c->index); + SetDParam(0, (CompanyID)this->window_number); + SetDParam(1, (CompanyID)this->window_number); } }