diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
commit | 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch) | |
tree | f3e5c225182fce7a451af4e09e943920e0f1cc3c /src/airport_gui.cpp | |
parent | b10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff) | |
download | openttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz |
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 8d97add91..55f7e4ad9 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -67,9 +67,9 @@ static void PlaceAirport(TileIndex tile) struct BuildAirToolbarWindow : Window { int last_user_action; // Last started user action. - BuildAirToolbarWindow(const WindowDesc *desc, WindowNumber window_number) : Window() + BuildAirToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this); this->last_user_action = WIDGET_LIST_END; } @@ -165,7 +165,7 @@ static const NWidgetPart _nested_air_toolbar_widgets[] = { EndContainer(), }; -static const WindowDesc _air_toolbar_desc( +static WindowDesc _air_toolbar_desc( WDP_ALIGN_TOOLBAR, 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -215,15 +215,15 @@ class BuildAirportWindow : public PickerWindowBase { } public: - BuildAirportWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(parent) + BuildAirportWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent) { - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_AP_SCROLLBAR); this->vscroll->SetCapacity(5); this->vscroll->SetPosition(0); - this->FinishInitNested(desc, TRANSPORT_AIR); + this->FinishInitNested(TRANSPORT_AIR); this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage); this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage); @@ -554,7 +554,7 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), }; -static const WindowDesc _build_airport_desc( +static WindowDesc _build_airport_desc( WDP_AUTO, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, |