diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -189,7 +189,7 @@ class ReplaceVehicleWindow : public Wind } 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 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 EndContainer(), }; -static const WindowDesc _replace_vehicle_desc( +static WindowDesc _replace_vehicle_desc( WDP_AUTO, 456, 118, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION,