summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-11-15 18:21:17 +0000
committersmatz <smatz@openttd.org>2009-11-15 18:21:17 +0000
commitc71e3548d7fb60f9d4560bfccbfb088da8909ec1 (patch)
tree881bdbf0ea4e64a44ceb50383a4c45ac226734dd /src
parent60c04c25a2172661939517ff48820dec5362e1ee (diff)
downloadopenttd-c71e3548d7fb60f9d4560bfccbfb088da8909ec1.tar.xz
(svn r18102) -Codechange: simplify Company::Get(this->window_number)->index to just this->window_number
Diffstat (limited to 'src')
-rw-r--r--src/company_gui.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index f72487010..5ac2d06dc 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -303,11 +303,10 @@ struct CompanyFinancesWindow : Window {
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 @@ struct CompanyWindow : Window
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);
}
}