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/autoreplace_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/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index ef7cbdb56..7a1b8b297 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -189,7 +189,7 @@ class ReplaceVehicleWindow : public Window { } public: - ReplaceVehicleWindow(const WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window() + ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc) { if (vehicletype == VEH_TRAIN) { /* For rail vehicles find the most used vehicle type, which is usually @@ -217,10 +217,10 @@ public: this->sel_engine[0] = INVALID_ENGINE; this->sel_engine[1] = INVALID_ENGINE; - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->vscroll[0] = this->GetScrollbar(WID_RV_LEFT_SCROLLBAR); this->vscroll[1] = this->GetScrollbar(WID_RV_RIGHT_SCROLLBAR); - this->FinishInitNested(desc, vehicletype); + this->FinishInitNested(vehicletype); this->owner = _local_company; this->sel_group = id_g; @@ -563,7 +563,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = { EndContainer(), }; -static const WindowDesc _replace_rail_vehicle_desc( +static WindowDesc _replace_rail_vehicle_desc( WDP_AUTO, 500, 140, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION, @@ -595,7 +595,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = { EndContainer(), }; -static const WindowDesc _replace_vehicle_desc( +static WindowDesc _replace_vehicle_desc( WDP_AUTO, 456, 118, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION, |