summaryrefslogtreecommitdiff
path: root/src/airport_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:27:55 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:27:55 +0000
commit6f4d2160c25c75ed0d09657bfb0f85fdac65bfcd (patch)
tree0002c621456141b330133f45a959fe4c6b28ac7c /src/airport_gui.cpp
parent73d926c8d4b7cb327cb1d3484dbecd8303268172 (diff)
downloadopenttd-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/airport_gui.cpp')
-rw-r--r--src/airport_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index e6591935c..893e3b5fb 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -208,7 +208,7 @@ class BuildAirportWindow : public PickerWindowBase {
DropDownList *list = new DropDownList();
for (uint i = 0; i < AirportClass::GetCount(); i++) {
- list->push_back(new DropDownListStringItem(AirportClass::GetName((AirportClassID)i), i, false));
+ list->push_back(new DropDownListStringItem(AirportClass::Get((AirportClassID)i)->name, i, false));
}
return list;
@@ -242,7 +242,7 @@ public:
{
switch (widget) {
case WID_AP_CLASS_DROPDOWN:
- SetDParam(0, AirportClass::GetName(_selected_airport_class));
+ SetDParam(0, AirportClass::Get(_selected_airport_class)->name);
break;
case WID_AP_LAYOUT_NUM:
@@ -269,7 +269,7 @@ public:
case WID_AP_CLASS_DROPDOWN: {
Dimension d = {0, 0};
for (uint i = 0; i < AirportClass::GetCount(); i++) {
- SetDParam(0, AirportClass::GetName((AirportClassID)i));
+ SetDParam(0, AirportClass::Get((AirportClassID)i)->name);
d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
}
d.width += padding.width;