diff options
author | frosch <frosch@openttd.org> | 2012-04-22 16:27:55 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-04-22 16:27:55 +0000 |
commit | 6f4d2160c25c75ed0d09657bfb0f85fdac65bfcd (patch) | |
tree | 0002c621456141b330133f45a959fe4c6b28ac7c /src/object_gui.cpp | |
parent | 73d926c8d4b7cb327cb1d3484dbecd8303268172 (diff) | |
download | openttd-6f4d2160c25c75ed0d09657bfb0f85fdac65bfcd.tar.xz |
(svn r24162) -Codechange: Remove NewGRFClass::GetName() and SetName() in favour of using Get() and direct member access (which is needed anyway for GRF string resolving).
Diffstat (limited to 'src/object_gui.cpp')
-rw-r--r-- | src/object_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp index 241fcdca6..5813517e9 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -78,7 +78,7 @@ public: switch (widget) { case WID_BO_CLASS_LIST: { for (uint i = 0; i < ObjectClass::GetCount(); i++) { - size->width = max(size->width, GetStringBoundingBox(ObjectClass::GetName((ObjectClassID)i)).width); + size->width = max(size->width, GetStringBoundingBox(ObjectClass::Get((ObjectClassID)i)->name).width); } size->width += padding.width; this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM; @@ -156,7 +156,7 @@ public: case WID_BO_CLASS_LIST: { int y = r.top; for (uint i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < ObjectClass::GetCount(); i++) { - SetDParam(0, ObjectClass::GetName((ObjectClassID)i)); + SetDParam(0, ObjectClass::Get((ObjectClassID)i)->name); DrawString(r.left + WD_MATRIX_LEFT, r.right + WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, STR_JUST_STRING, ((int)i == _selected_object_class) ? TC_WHITE : TC_BLACK); y += this->line_height; |