diff --git a/src/company_gui.cpp b/src/company_gui.cpp --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -273,12 +273,12 @@ struct CompanyFinancesWindow : Window { static Money max_money; ///< The maximum amount of money a company has had this 'run' bool small; ///< Window is toggled to 'small'. - CompanyFinancesWindow(const WindowDesc *desc, CompanyID company) : Window() + CompanyFinancesWindow(WindowDesc *desc, CompanyID company) : Window(desc) { this->small = false; - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->SetupWidgets(); - this->FinishInitNested(desc, company); + this->FinishInitNested(company); this->owner = (Owner)this->window_number; } @@ -463,7 +463,7 @@ struct CompanyFinancesWindow : Window { /** First conservative estimate of the maximum amount of money */ Money CompanyFinancesWindow::max_money = INT32_MAX; -static const WindowDesc _company_finances_desc( +static WindowDesc _company_finances_desc( WDP_AUTO, 0, 0, WC_FINANCES, WC_NONE, 0, @@ -581,7 +581,7 @@ private: } public: - SelectCompanyLiveryWindow(const WindowDesc *desc, CompanyID company) : Window() + SelectCompanyLiveryWindow(WindowDesc *desc, CompanyID company) : Window(desc) { this->livery_class = LC_OTHER; this->sel = 1; @@ -590,7 +590,7 @@ public: this->box = maxdim(GetSpriteSize(SPR_BOX_CHECKED), GetSpriteSize(SPR_BOX_EMPTY)); this->line_height = max(max(this->square.height, this->box.height), (uint)FONT_HEIGHT_NORMAL) + 4; - this->InitNested(desc, company); + this->InitNested(company); this->owner = company; this->LowerWidget(WID_SCL_CLASS_GENERAL); this->InvalidateData(1); @@ -841,7 +841,7 @@ static const NWidgetPart _nested_select_ NWidget(WWT_MATRIX, COLOUR_GREY, WID_SCL_MATRIX), SetMinimalSize(275, 15), SetFill(1, 0), SetDataTip((1 << MAT_ROW_START) | (1 << MAT_COL_START), STR_LIVERY_PANEL_TOOLTIP), }; -static const WindowDesc _select_company_livery_desc( +static WindowDesc _select_company_livery_desc( WDP_AUTO, 0, 0, WC_COMPANY_COLOUR, WC_NONE, 0, @@ -1077,12 +1077,12 @@ class SelectCompanyManagerFaceWindow : p } public: - SelectCompanyManagerFaceWindow(const WindowDesc *desc, Window *parent) : Window() + SelectCompanyManagerFaceWindow(WindowDesc *desc, Window *parent) : Window(desc) { this->advanced = false; - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->SelectDisplayPlanes(this->advanced); - this->FinishInitNested(desc, parent->window_number); + this->FinishInitNested(parent->window_number); this->parent = parent; this->owner = (Owner)this->window_number; this->face = Company::Get((CompanyID)this->window_number)->face; @@ -1479,7 +1479,7 @@ const StringID SelectCompanyManagerFaceW }; /** Company manager face selection window description */ -static const WindowDesc _select_company_manager_face_desc( +static WindowDesc _select_company_manager_face_desc( WDP_AUTO, 0, 0, WC_COMPANY_MANAGER_FACE, WC_NONE, WDF_CONSTRUCTION, @@ -1545,11 +1545,11 @@ struct CompanyInfrastructureWindow : Win uint total_width; ///< String width of the total cost line. - CompanyInfrastructureWindow(const WindowDesc *desc, WindowNumber window_number) : Window() + CompanyInfrastructureWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) { this->UpdateRailRoadTypes(); - this->InitNested(desc, window_number); + this->InitNested(window_number); this->owner = (Owner)this->window_number; } @@ -1833,7 +1833,7 @@ struct CompanyInfrastructureWindow : Win } }; -static const WindowDesc _company_infrastructure_desc( +static WindowDesc _company_infrastructure_desc( WDP_AUTO, 0, 0, WC_COMPANY_INFRASTRUCTURE, WC_NONE, 0, @@ -1983,9 +1983,9 @@ struct CompanyWindow : Window CWP_BUTTONS_OTHER, ///< Buttons of the other companies. }; - CompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window() + CompanyWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); this->owner = (Owner)this->window_number; this->OnInvalidateData(); } @@ -2410,7 +2410,7 @@ struct CompanyWindow : Window } }; -static const WindowDesc _company_desc( +static WindowDesc _company_desc( WDP_AUTO, 0, 0, WC_COMPANY, WC_NONE, 0, @@ -2439,9 +2439,9 @@ void DirtyCompanyInfrastructureWindows(C } struct BuyCompanyWindow : Window { - BuyCompanyWindow(const WindowDesc *desc, WindowNumber window_number) : Window() + BuyCompanyWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) { - this->InitNested(desc, window_number); + this->InitNested(window_number); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) @@ -2522,7 +2522,7 @@ static const NWidgetPart _nested_buy_com EndContainer(), }; -static const WindowDesc _buy_company_desc( +static WindowDesc _buy_company_desc( WDP_AUTO, 0, 0, WC_BUY_COMPANY, WC_NONE, WDF_CONSTRUCTION,